swirl
Guide to OmniMark 8   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 ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:25:49 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.