using nested-referents Full Description |
|
Syntaxusing nested-referents action Purpose A new set of referent definitions can be created for the duration of an action by prefixing it with The new set initially has no definitions. At the end of the new action,
Referents are resolved by replacing the referent with its final value in every stream that it was written to. If a referent written to a stream has no value when it is resolved, then OmniMark signals a fatal error. If any stream was opened within the scope of a It is an error for a stream attached to a referent to be open when the referent is resolved. (Streams are automatically closed when the scope in which they were declared ends. If the end of the stream's scope occurs before the end of the referent's scope, then the stream will automatically be closed before the referent is resolved. Otherwise, it is the programmer's responsibility to close the stream before the referent resolution.) This example is a simple case of using a nested referent set. An element "link" is found in an SGML document, and the program's response is to parse and output a document described by the "link" element's attribute. The input and output files' names are based on the attribute's value, and a special group of ( element link ; An element that links to another document that needs processing. do sgml-parse document with scan file "%v(docname).doc" using nested-referents using group linked-doc set file "%v(docname).out" with referents-allowed to "%c" done suppress |