• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2000 World Wide Web Consortium,
3  * (Massachusetts Institute of Technology, Institut National de
4  * Recherche en Informatique et en Automatique, Keio University). All
5  * Rights Reserved. This program is distributed under the W3C's Software
6  * Intellectual Property License. This program is distributed in the
7  * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8  * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  * PURPOSE.
10  * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
11  */
12 
13 package org.w3c.dom;
14 
15 //BEGIN android-note
16 //Filled some gaps in the documentation and refactored parts of the existing
17 //documentation to make the Doclet happy.
18 //END android-note
19 
20 /**
21  * Each <code>Document</code> has a <code>doctype</code> attribute whose value
22  * is either <code>null</code> or a <code>DocumentType</code> object. The
23  * <code>DocumentType</code> interface in the DOM Core provides an interface
24  * to the list of entities that are defined for the document, and little
25  * else because the effect of namespaces and the various XML schema efforts
26  * on DTD representation are not clearly understood as of this writing.
27  * <p>The DOM Level 2 doesn't support editing <code>DocumentType</code> nodes.
28  * <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>.
29  */
30 public interface DocumentType extends Node {
31     /**
32      * The name of DTD; i.e., the name immediately following the
33      * <code>DOCTYPE</code> keyword.
34      *
35      * @return the name of the DTD.
36      */
getName()37     public String getName();
38 
39     /**
40      * A <code>NamedNodeMap</code> containing the general entities, both
41      * external and internal, declared in the DTD. Parameter entities are
42      * not contained. Duplicates are discarded. For example in:
43      * <pre>&lt;!DOCTYPE
44      * ex SYSTEM "ex.dtd" [ &lt;!ENTITY foo "foo"&gt; &lt;!ENTITY bar
45      * "bar"&gt; &lt;!ENTITY bar "bar2"&gt; &lt;!ENTITY % baz "baz"&gt;
46      * ]&gt; &lt;ex/&gt;</pre>
47      *  the interface provides access to <code>foo</code>
48      * and the first declaration of <code>bar</code> but not the second
49      * declaration of <code>bar</code> or <code>baz</code>. Every node in
50      * this map also implements the <code>Entity</code> interface.
51      * <br>The DOM Level 2 does not support editing entities, therefore
52      * <code>entities</code> cannot be altered in any way.
53      *
54      * @return the entities declared in this DTD.
55      */
getEntities()56     public NamedNodeMap getEntities();
57 
58     /**
59      * A <code>NamedNodeMap</code> containing the notations declared in the
60      * DTD. Duplicates are discarded. Every node in this map also implements
61      * the <code>Notation</code> interface.
62      * <br>The DOM Level 2 does not support editing notations, therefore
63      * <code>notations</code> cannot be altered in any way.
64      *
65      * @return the notations declared in this DTD.
66      */
getNotations()67     public NamedNodeMap getNotations();
68 
69     /**
70      * The public identifier of the external subset.
71      *
72      * @return the public identifier.
73      *
74      * @since DOM Level 2
75      */
getPublicId()76     public String getPublicId();
77 
78     /**
79      * The system identifier of the external subset.
80      *
81      * @return the system identifier.
82      *
83      * @since DOM Level 2
84      */
getSystemId()85     public String getSystemId();
86 
87     /**
88      * The internal subset as a string. The actual content returned depends on
89      * how much information is available to the implementation. This may
90      * vary depending on various parameters, including the XML processor
91      * used to build the document.
92      *
93      * @return the internal subset.
94      *
95      * @since DOM Level 2
96      */
getInternalSubset()97     public String getInternalSubset();
98 
99 }
100