swirl Guide to OmniMark 5   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesOMX VariablesErrors
Prerequisite Concepts     Related Syntax  
Attributes: type tests

It is possible to test for the type of an element attribute or data attribute. An attribute can be declared with one of the following types:

An attribute can also be declared as a name token group. (A name token group attribute can only have one of the values specified in the parenthesized list of names.)

If the specified attribute was not declared for the qualified element (or entity), or if the qualified element does not exist, then an error message is printed and OmniMark halts. The error message can be avoided by using the is specified, is defaulted, or is implied tests.

Attribute type tests can be combined by separating the types with or or | and parenthesizing them. Note that for a data attribute, a test of its type for ID, IDREF, IDREFS, NOTATION, ENTITY, or ENTITIES will always fail, because those types of attributes cannot be associated with a notation.

Entity and notation attribute tests can be applied directly to attribute values which are declared as ENTITY or NOTATION, or directly to an item of an attribute declared as ENTITIES. It is usually wise to test that the attribute value is an ENTITY, ENTITIES, or NOTATION attribute before applying the entity or notation test.

Attribute type tests can be combined by separating the types with the or keyword or its short form, the | symbol. For example:

  do when attribute id is (idref | idrefs)

Prerequisite Concepts
     Data attributes associated with entity attributes
  Related Syntax
   is defaulted
   is implied
   is specified


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

Copyright © OmniMark Technologies Corporation, 1988-2000.