contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
Attributes: type tests
Prerequisite Concepts     Related Syntax  

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 I idrefs)
  ...
  done

Prerequisite Concepts
     Data attributes associated with entity attributes
   Elements
   Entities
   Notations
 
  Related Syntax
   attribute
   data-attribute
   is defaulted
   is implied
   is specified
   or
 
----

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

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

Copyright © OmniMark Technologies Corporation, 1988-1999.