01: /*
02: * Copyright (c) 2000 World Wide Web Consortium,
03: * (Massachusetts Institute of Technology, Institut National de
04: * Recherche en Informatique et en Automatique, Keio University). All
05: * Rights Reserved. This program is distributed under the W3C's Software
06: * Intellectual Property License. This program is distributed in the
07: * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
08: * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
09: * PURPOSE.
10: * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
11: */
12:
13: package org.w3c.dom;
14:
15: /**
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: * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
24: */
25: public interface DocumentType extends Node {
26: /**
27: * The name of DTD; i.e., the name immediately following the
28: * <code>DOCTYPE</code> keyword.
29: */
30: public String getName();
31:
32: /**
33: * A <code>NamedNodeMap</code> containing the general entities, both
34: * external and internal, declared in the DTD. Parameter entities are
35: * not contained. Duplicates are discarded. For example in:
36: * <pre><!DOCTYPE
37: * ex SYSTEM "ex.dtd" [ <!ENTITY foo "foo"> <!ENTITY bar
38: * "bar"> <!ENTITY bar "bar2"> <!ENTITY % baz "baz">
39: * ]> <ex/></pre>
40: * the interface provides access to <code>foo</code>
41: * and the first declaration of <code>bar</code> but not the second
42: * declaration of <code>bar</code> or <code>baz</code>. Every node in
43: * this map also implements the <code>Entity</code> interface.
44: * <br>The DOM Level 2 does not support editing entities, therefore
45: * <code>entities</code> cannot be altered in any way.
46: */
47: public NamedNodeMap getEntities();
48:
49: /**
50: * A <code>NamedNodeMap</code> containing the notations declared in the
51: * DTD. Duplicates are discarded. Every node in this map also implements
52: * the <code>Notation</code> interface.
53: * <br>The DOM Level 2 does not support editing notations, therefore
54: * <code>notations</code> cannot be altered in any way.
55: */
56: public NamedNodeMap getNotations();
57:
58: /**
59: * The public identifier of the external subset.
60: * @since DOM Level 2
61: */
62: public String getPublicId();
63:
64: /**
65: * The system identifier of the external subset.
66: * @since DOM Level 2
67: */
68: public String getSystemId();
69:
70: /**
71: * The internal subset as a string, or <code>null</code> if there is none.
72: * This is does not contain the delimiting square brackets.The actual
73: * content returned depends on how much information is available to the
74: * implementation. This may vary depending on various parameters,
75: * including the XML processor used to build the document.
76: * @since DOM Level 2
77: */
78: public String getInternalSubset();
79:
80: }
|