Section 25.81. DocumentType: the DTD of an XML document


25.81. DocumentType: the DTD of an XML document

DOM Level 1 XML: Node DocumentType

25.81.1. Properties


readonly String internalSubset [DOM Level 2]

The unparsed text of the internal subset of the DTD (i.e., the portion of the DTD that appears in the document itself rather than in an external file). The delimiting square brackets of the internal subset are not part of the returned value. If there is no internal subset, this property is null.


readonly String name

The name of the document type. This is the identifier that immediately follows <!DOCTYPE> at the start of an XML document, and it is the same as the tag name of the document's root element.


readonly String publicId [DOM Level 2]

The public identifier of the external subset of the DTD, or null if none is specified.


readonly String systemId [DOM Level 2]

The system identifier of the external subset of the DTD, or null if none is specified.

25.81.2. Description

This infrequently used interface represents the DTD of an XML document. Programmers working exclusively with HTML documents never need to use this interface.

Because a DTD is not part of a document's content, DocumentType nodes never appear in the document tree. If an XML document has a DTD, the DocumentType node for that DTD is available through the doctype property of the Document node.

Although the W3C DOM includes an API for accessing the XML entities and notations defined in a DTD, that API is not documented here. Typical web browsers do not parse the DTDs for the documents they load, and client-side JavaScript can not access those entities and notations. For client-side JavaScript programming, this interface represents only the contents of the <!DOCTYPE> tag, not the contents of the DTD file it references.

DocumentType nodes are immutable and may not be modified in any way.

25.81.3. See Also

Document, DOMImplementation.createDocument( ), DOMImplementation.createDocumentType( )




JavaScript. The Definitive Guide
JavaScript: The Definitive Guide
ISBN: 0596101996
EAN: 2147483647
Year: 2004
Pages: 767

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net