swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
     

Entity attributes

In SGML, attributes may be of type entity or entities. Retrieving the data associated with an entity that is the value of an attribute is similar to retrieving the value of a regular entity, except that you must do so in an element rule instead of an external text or data entity rule.

This has the following consequences:


  declare catch entity-replacement-found
  element "foo"
     repeat over attributes as this-attribute
        do when attribute this-attribute is entity
           do when attribute this-attribute is external
              do when #library has key "%pv(baz)"
                 do when file #library{"%pv(baz)"} exists
                    output file #library{"%pv(baz)"}
                 else
                    repeat over #libpath
                       do when file (#libpath || #library{"%pv(baz)"}) exists
                          output file (#libpath || #library{"%pv(baz)"})
                          throw entity-replacement-found
                       done
                    again
                 done
              else
                 do when file "%ev(baz)" exists
                    output file "%ev(baz)"
                    throw entity-replacement-found
                 done
              done
              output ""
              catch entity-replacement-found
           else ;it is an internal entity
              output "%ev(this-attribute)" ; output its replacement text
           done
        done
     again
     output "%c"

       
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:44:35 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.