2
* Copyright (c) 2003 World Wide Web Consortium,
4
* (Massachusetts Institute of Technology, European Research Consortium for
5
* Informatics and Mathematics, Keio University). All Rights Reserved. This
6
* work is distributed under the W3C(r) Software License [1] in the hope that
7
* it will be useful, but WITHOUT ANY WARRANTY; without even the implied
8
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
* [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
16
* Each <code>Document</code> has a <code>doctype</code> attribute whose value
17
* is either <code>null</code> or a <code>DocumentType</code> object. The
18
* <code>DocumentType</code> interface in the DOM Core provides an interface
19
* to the list of entities that are defined for the document, and little
20
* else because the effect of namespaces and the various XML schema efforts
21
* on DTD representation are not clearly understood as of this writing.
22
* <p>The DOM Level 2 doesn't support editing <code>DocumentType</code> nodes.
23
* <code>DocumentType</code> nodes are read-only.
24
* <p>See also the <a href='http://www.w3.org/TR/2003/CR-DOM-Level-3-Core-20031107'>Document Object Model (DOM) Level 3 Core Specification</a>.
26
public interface DocumentType extends Node {
28
* The name of DTD; i.e., the name immediately following the
29
* <code>DOCTYPE</code> keyword.
31
public String getName();
34
* A <code>NamedNodeMap</code> containing the general entities, both
35
* external and internal, declared in the DTD. Parameter entities are
36
* not contained. Duplicates are discarded. For example in:
38
* ex SYSTEM "ex.dtd" [ <!ENTITY foo "foo"> <!ENTITY bar
39
* "bar"> <!ENTITY bar "bar2"> <!ENTITY % baz "baz">
40
* ]> <ex/></pre>
41
* the interface provides access to <code>foo</code>
42
* and the first declaration of <code>bar</code> but not the second
43
* declaration of <code>bar</code> or <code>baz</code>. Every node in
44
* this map also implements the <code>Entity</code> interface.
45
* <br>The DOM Level 2 does not support editing entities, therefore
46
* <code>entities</code> cannot be altered in any way.
48
public NamedNodeMap getEntities();
51
* A <code>NamedNodeMap</code> containing the notations declared in the
52
* DTD. Duplicates are discarded. Every node in this map also implements
53
* the <code>Notation</code> interface.
54
* <br>The DOM Level 2 does not support editing notations, therefore
55
* <code>notations</code> cannot be altered in any way.
57
public NamedNodeMap getNotations();
60
* The public identifier of the external subset.
63
public String getPublicId();
66
* The system identifier of the external subset. This may be an absolute
70
public String getSystemId();
73
* The internal subset as a string, or <code>null</code> if there is none.
74
* This is does not contain the delimiting square brackets.
75
* <p ><b>Note:</b> The actual content returned depends on how much
76
* information is available to the implementation. This may vary
77
* depending on various parameters, including the XML processor used to
81
public String getInternalSubset();