|
|||||
|
|||||
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:
document-start
rule.
do xml-parse
or do sgml-parse
block prior to the first %c
or suppress
, unless a pre-compiled DTD is used.
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 |
Copyright © Stilo International plc, 1988-2010.