001 /*
002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
003 *
004 * This code is free software; you can redistribute it and/or modify it
005 * under the terms of the GNU General Public License version 2 only, as
006 * published by the Free Software Foundation. Sun designates this
007 * particular file as subject to the "Classpath" exception as provided
008 * by Sun in the LICENSE file that accompanied this code.
009 *
010 * This code is distributed in the hope that it will be useful, but WITHOUT
011 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
012 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
013 * version 2 for more details (a copy is included in the LICENSE file that
014 * accompanied this code).
015 *
016 * You should have received a copy of the GNU General Public License version
017 * 2 along with this work; if not, write to the Free Software Foundation,
018 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
019 *
020 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
021 * CA 95054 USA or visit www.sun.com if you need additional information or
022 * have any questions.
023 */
024
025 /*
026 * This file is available under and governed by the GNU General Public
027 * License version 2 only, as published by the Free Software Foundation.
028 * However, the following notice accompanied the original version of this
029 * file and, per its terms, should not be removed:
030 *
031 * Copyright (c) 2004 World Wide Web Consortium,
032 *
033 * (Massachusetts Institute of Technology, European Research Consortium for
034 * Informatics and Mathematics, Keio University). All Rights Reserved. This
035 * work is distributed under the W3C(r) Software License [1] in the hope that
036 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
037 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
038 *
039 * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
040 */
041
042 package org.w3c.dom;
043
044 /**
045 * Each <code>Document</code> has a <code>doctype</code> attribute whose value
046 * is either <code>null</code> or a <code>DocumentType</code> object. The
047 * <code>DocumentType</code> interface in the DOM Core provides an interface
048 * to the list of entities that are defined for the document, and little
049 * else because the effect of namespaces and the various XML schema efforts
050 * on DTD representation are not clearly understood as of this writing.
051 * <p>DOM Level 3 doesn't support editing <code>DocumentType</code> nodes.
052 * <code>DocumentType</code> nodes are read-only.
053 * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
054 */
055 public interface DocumentType extends Node {
056 /**
057 * The name of DTD; i.e., the name immediately following the
058 * <code>DOCTYPE</code> keyword.
059 */
060 public String getName();
061
062 /**
063 * A <code>NamedNodeMap</code> containing the general entities, both
064 * external and internal, declared in the DTD. Parameter entities are
065 * not contained. Duplicates are discarded. For example in:
066 * <pre><!DOCTYPE
067 * ex SYSTEM "ex.dtd" [ <!ENTITY foo "foo"> <!ENTITY bar
068 * "bar"> <!ENTITY bar "bar2"> <!ENTITY % baz "baz">
069 * ]> <ex/></pre>
070 * the interface provides access to <code>foo</code>
071 * and the first declaration of <code>bar</code> but not the second
072 * declaration of <code>bar</code> or <code>baz</code>. Every node in
073 * this map also implements the <code>Entity</code> interface.
074 * <br>The DOM Level 2 does not support editing entities, therefore
075 * <code>entities</code> cannot be altered in any way.
076 */
077 public NamedNodeMap getEntities();
078
079 /**
080 * A <code>NamedNodeMap</code> containing the notations declared in the
081 * DTD. Duplicates are discarded. Every node in this map also implements
082 * the <code>Notation</code> interface.
083 * <br>The DOM Level 2 does not support editing notations, therefore
084 * <code>notations</code> cannot be altered in any way.
085 */
086 public NamedNodeMap getNotations();
087
088 /**
089 * The public identifier of the external subset.
090 * @since DOM Level 2
091 */
092 public String getPublicId();
093
094 /**
095 * The system identifier of the external subset. This may be an absolute
096 * URI or not.
097 * @since DOM Level 2
098 */
099 public String getSystemId();
100
101 /**
102 * The internal subset as a string, or <code>null</code> if there is none.
103 * This is does not contain the delimiting square brackets.
104 * <p ><b>Note:</b> The actual content returned depends on how much
105 * information is available to the implementation. This may vary
106 * depending on various parameters, including the XML processor used to
107 * build the document.
108 * @since DOM Level 2
109 */
110 public String getInternalSubset();
111
112 }
|