contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
External text entity rules: additional tests
Prerequisite Concepts     Related Syntax  

External text entities can be either general entities (introduced by "&") or parameter entities (introduced by "%"). Since external-text-entity rules are processed for both general and parameter external text entities, be prepared to handle both kinds of entities.

If an entity has a system or public identifier (or both) it usually doesn't matter whether it's a general or parameter entity; the rules for finding the information referenced by the system identifier are usually the same.

However, if only an entity name is provided and the OmniMark program is written to use the entity name (as part of a file name, for example), the program can be set to find this information differently for general and parameter entities. The following two declarations demonstrate the difference:

  <!ENTITY chapter1 SYSTEM -- text of the first chapter -->
  <!ENTITY % comdc1 SYSTEM -- common declarations -->

Two tests can be used in an external-text-entity rule to distinguish between general and parameter entities:

  entity is general
  entity is parameter

One of these two tests is always true of an entity in an external-text-entity rule, so entity is general is equivalent to entity isnt parameter and entity is parameter is equivalent to entity isnt general.

These tests also can be used in the external-data-entity rule, or with the entity or entities attribute values. However, in both cases, the entity is always a general entity.

An entity manager designer should note that, in general, parameter entity references usually occur in the DTD and general entity references usually occur in the document instance. There are, however, two exceptions to this general rule:

  1. In USEMAP declarations and in the specification part of marked section declarations (the bit between the first "[" and the second "[" in the document instance) only parameter entities can be referenced. These are considered declaration contexts, like the DTD, and can contain either internal or external parameter entity references, but not general entity references.
  2. Attribute values are considered "instance-like" whether they appear in the DTD (default values) or in the document instance (specified values) because, even if they are default values, they actually get used in the instance. No matter where they appear, only general entity references are recognized, and they can be internal or external entities.

In summary, both general and parameter external entity references can occur in both the DTD and the document instance.

Prerequisite Concepts
     Entities
   Entities: tests
   Entity manager: built-in
   Entity managers: programmer-defined
   External entity rules
   External text entities: default processing
 
  Related Syntax
   external-text-entity
 
----

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

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

Copyright © OmniMark Technologies Corporation, 1988-1999.