swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax   Related Concepts  
built-in entity  

#dtd

 
 

Syntax

external-text-entity #dtd
OR
(when | unless) entity is #dtd


Purpose

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"

    Related Syntax
 
Related Concepts
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:51:21 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.