element
Full Description
swirl
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
  ...

Copyright © OmniMark Technologies Corporation, 1988-1998.