swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
 
     
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 ] [ OMX ] [ OMX ] [ ERRORS ]

Generated: August 11, 2000 at 3:06:19 pm
If you have any comments about this section of the documentation, send email to docerrors@omnimark.com

Copyright © OmniMark Technologies Corporation, 1988-2000.