001/*
002 * Copyright (c) 2000 World Wide Web Consortium,
003 * (Massachusetts Institute of Technology, Institut National de
004 * Recherche en Informatique et en Automatique, Keio University). All
005 * Rights Reserved. This program is distributed under the W3C's Software
006 * Intellectual Property License. This program is distributed in the
007 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
008 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
009 * PURPOSE.
010 * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
011 */
012
013package org.w3c.dom;
014
015/**
016 * Each <code>Document</code> has a <code>doctype</code> attribute whose value 
017 * is either <code>null</code> or a <code>DocumentType</code> object. The 
018 * <code>DocumentType</code> interface in the DOM Core provides an interface 
019 * to the list of entities that are defined for the document, and little 
020 * else because the effect of namespaces and the various XML schema efforts 
021 * on DTD representation are not clearly understood as of this writing.
022 * <p>The DOM Level 2 doesn't support editing <code>DocumentType</code> nodes.
023 * <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>.
024 */
025public interface DocumentType extends Node {
026    /**
027     * The name of DTD; i.e., the name immediately following the 
028     * <code>DOCTYPE</code> keyword.
029     */
030    public String getName();
031
032    /**
033     * A <code>NamedNodeMap</code> containing the general entities, both 
034     * external and internal, declared in the DTD. Parameter entities are 
035     * not contained. Duplicates are discarded. For example in: 
036     * <pre>&lt;!DOCTYPE 
037     * ex SYSTEM "ex.dtd" [ &lt;!ENTITY foo "foo"&gt; &lt;!ENTITY bar 
038     * "bar"&gt; &lt;!ENTITY bar "bar2"&gt; &lt;!ENTITY % baz "baz"&gt; 
039     * ]&gt; &lt;ex/&gt;</pre>
040     *  the interface provides access to <code>foo</code> 
041     * and the first declaration of <code>bar</code> but not the second 
042     * declaration of <code>bar</code> or <code>baz</code>. Every node in 
043     * this map also implements the <code>Entity</code> interface.
044     * <br>The DOM Level 2 does not support editing entities, therefore 
045     * <code>entities</code> cannot be altered in any way.
046     */
047    public NamedNodeMap getEntities();
048
049    /**
050     * A <code>NamedNodeMap</code> containing the notations declared in the 
051     * DTD. Duplicates are discarded. Every node in this map also implements 
052     * the <code>Notation</code> interface.
053     * <br>The DOM Level 2 does not support editing notations, therefore 
054     * <code>notations</code> cannot be altered in any way.
055     */
056    public NamedNodeMap getNotations();
057
058    /**
059     * The public identifier of the external subset.
060     * @since DOM Level 2
061     */
062    public String getPublicId();
063
064    /**
065     * The system identifier of the external subset.
066     * @since DOM Level 2
067     */
068    public String getSystemId();
069
070    /**
071     * The internal subset as a string.The actual content returned depends on 
072     * how much information is available to the implementation. This may 
073     * vary depending on various parameters, including the XML processor 
074     * used to build the document.
075     * @since DOM Level 2
076     */
077    public String getInternalSubset();
078
079}