contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
rule type   element    
Sample Code   Related Syntax   Related Concepts  

Syntax

  element (element-name (| element-name)* | #implied)  condition?


Purpose

element rules control XML/SGML transactions. When processing an SGML source document, OmniMark performs the actions in the applicable element rule as each element is encountered.

The same element name may appear in more than one element rule. In this case, every element rule in which the element name appears must have a condition which ensures that only one of the rules will be selected.

An OmniMark program must uniquely account for all elements in a processed XML/SGML document. It is an error if more than one element rule applies to a single element in the document. Similarly, it is a fatal error if there is no pertinent element rule.

OmniMark requires an element rule to be selected for every element that occurs in a document instance. The #implied operator is used to specify all elements not covered by other rules.

The following is an example of an element rule. It would be invoked for every chapter as well as every appendix encountered in a document:

  element (chapter | appendix)
  ...

The following element rule uses the "parent is" test, and can be used to deal with all of the subelements of a paragraph:

  element #implied when parent is par
  ...

Sample Code  
   SGML to HTML conversions
   TeX to SGML conversions
 
Related Syntax
   element
   #implied
 
Related Concepts
   Elements
   Elements: counting
   Elements: declaration tests
   Elements: default processing
   Elements: empty
   Elements: names
   Elements: qualifiers
   Elements: retrieving the names of open elements
   Elements: testing open elements
   Elements: testing recently closed elements
   Elements: testing the status of proper and included elements
   Elements: the current stack
   Elements: the document element name
   Event handling
   XML/SGML enquiry and comparison: combining
 
----

Top [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:01:04 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.