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

#doctype

 
 

Purpose

A built-in, read-only stream shelf that provides the name of the document element.

#doctype is attached as soon as OmniMark encounters the document element name at the start of the DTD, following the doctype keyword. Prior to this, #doctype is unattached. Specifically, it is never attached in the following:

The #doctype is attached test can be used to determine whether the document element name is available.

The following example shows how to use the name of the document element to find an external entity when the external identifier at the head of the DTD has neither a public nor system identifier (for example, <!doctype doc system>). For example, if the file name of the DTD can be obtained by appending a .dtd suffix to the name of the document element, then

  external-text-entity #dtd unless entity is (system | public)
     output file (#doctype || ".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.