built-in entity

external-text-entity #dtd
entity is #dtd


The name of the external entity that contains the declarations that follow the declarations in an SGML doctype declaration.

If the %q format item is used for the #dtd entity, it will produce the string #dtd. Note, however, that this entity really doesn't have a name, and that by using a variant SGML syntax, an SGML document can define an entity with the name #dtd that produces the results with the %q format item. To distinguish the real #dtd entity from the user's entity with the same name, use the entity is #dtd test.

The entity is #dtd test is used to determine whether the real entity is the #dtd entity. #dtd is used the way external, public, or parameter are used in an entity test, and can be combined with these other keywords. This is useful when an external-text-entity rule can process either the #dtd entity or another entity, and needs to determine which one it has processed.

If there are any external-text-entity rules in an OmniMark program that use the keyword #dtd in their headings, all #dtd entities must be handled by the OmniMark program. If no #dtd entity is handled by an OmniMark program then all such entities are subject to OmniMark's default processing.

In the head of the external-text-entity rule, #dtd can be combined with either #implied or the names of named entities, but not with both, because #implied cannot be combined with the names of entities.

The #dtd entity is considered a parameter entity (not a general entity) for the purposes of the entity is general and entity is parameter tests.

The following sample external text entity rule uses a file called default.dtd when there is an external identifier at the start of the DTD that has no public or system identifier (e.g., !DOCTYPE doc SYSTEM ).

  external-text-entity #dtd when entity isnt (system | public)
     output file "default.dtd"