]> oss.titaniummirror.com Git - msp430-gcc.git/blobdiff - libjava/org/w3c/dom/Document.java
Imported gcc-4.4.3
[msp430-gcc.git] / libjava / org / w3c / dom / Document.java
diff --git a/libjava/org/w3c/dom/Document.java b/libjava/org/w3c/dom/Document.java
deleted file mode 100644 (file)
index 2db27c9..0000000
+++ /dev/null
@@ -1,365 +0,0 @@
-/*\r
- * Copyright (c) 2000 World Wide Web Consortium,\r
- * (Massachusetts Institute of Technology, Institut National de\r
- * Recherche en Informatique et en Automatique, Keio University). All\r
- * Rights Reserved. This program is distributed under the W3C's Software\r
- * Intellectual Property License. This program is distributed in the\r
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even\r
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\r
- * PURPOSE.\r
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.\r
- */\r
-\r
-package org.w3c.dom;\r
-\r
-/**\r
- * The <code>Document</code> interface represents the entire HTML or XML \r
- * document. Conceptually, it is the root of the document tree, and provides \r
- * the primary access to the document's data.\r
- * <p>Since elements, text nodes, comments, processing instructions, etc. \r
- * cannot exist outside the context of a <code>Document</code>, the \r
- * <code>Document</code> interface also contains the factory methods needed \r
- * to create these objects. The <code>Node</code> objects created have a \r
- * <code>ownerDocument</code> attribute which associates them with the \r
- * <code>Document</code> within whose context they were created.\r
- * <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>.\r
- */\r
-public interface Document extends Node {\r
-    /**\r
-     * The Document Type Declaration (see <code>DocumentType</code>) \r
-     * associated with this document. For HTML documents as well as XML \r
-     * documents without a document type declaration this returns \r
-     * <code>null</code>. The DOM Level 2 does not support editing the \r
-     * Document Type Declaration. <code>docType</code> cannot be altered in \r
-     * any way, including through the use of methods inherited from the \r
-     * <code>Node</code> interface, such as <code>insertNode</code> or \r
-     * <code>removeNode</code>.\r
-     */\r
-    public DocumentType getDoctype();\r
-\r
-    /**\r
-     * The <code>DOMImplementation</code> object that handles this document. A \r
-     * DOM application may use objects from multiple implementations.\r
-     */\r
-    public DOMImplementation getImplementation();\r
-\r
-    /**\r
-     * This is a convenience attribute that allows direct access to the child \r
-     * node that is the root element of the document. For HTML documents, \r
-     * this is the element with the tagName "HTML".\r
-     */\r
-    public Element getDocumentElement();\r
-\r
-    /**\r
-     * Creates an element of the type specified. Note that the instance \r
-     * returned implements the <code>Element</code> interface, so attributes \r
-     * can be specified directly on the returned object.\r
-     * <br>In addition, if there are known attributes with default values, \r
-     * <code>Attr</code> nodes representing them are automatically created \r
-     * and attached to the element.\r
-     * <br>To create an element with a qualified name and namespace URI, use \r
-     * the <code>createElementNS</code> method.\r
-     * @param tagNameThe name of the element type to instantiate. For XML, \r
-     *   this is case-sensitive. For HTML, the <code>tagName</code> \r
-     *   parameter may be provided in any case, but it must be mapped to the \r
-     *   canonical uppercase form by the DOM implementation. \r
-     * @return A new <code>Element</code> object with the \r
-     *   <code>nodeName</code> attribute set to <code>tagName</code>, and \r
-     *   <code>localName</code>, <code>prefix</code>, and \r
-     *   <code>namespaceURI</code> set to <code>null</code>.\r
-     * @exception DOMException\r
-     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an \r
-     *   illegal character.\r
-     */\r
-    public Element createElement(String tagName)\r
-                                 throws DOMException;\r
-\r
-    /**\r
-     * Creates an empty <code>DocumentFragment</code> object. \r
-     * @return A new <code>DocumentFragment</code>.\r
-     */\r
-    public DocumentFragment createDocumentFragment();\r
-\r
-    /**\r
-     * Creates a <code>Text</code> node given the specified string.\r
-     * @param dataThe data for the node.\r
-     * @return The new <code>Text</code> object.\r
-     */\r
-    public Text createTextNode(String data);\r
-\r
-    /**\r
-     * Creates a <code>Comment</code> node given the specified string.\r
-     * @param dataThe data for the node.\r
-     * @return The new <code>Comment</code> object.\r
-     */\r
-    public Comment createComment(String data);\r
-\r
-    /**\r
-     * Creates a <code>CDATASection</code> node whose value is the specified \r
-     * string.\r
-     * @param dataThe data for the <code>CDATASection</code> contents.\r
-     * @return The new <code>CDATASection</code> object.\r
-     * @exception DOMException\r
-     *   NOT_SUPPORTED_ERR: Raised if this document is an HTML document.\r
-     */\r
-    public CDATASection createCDATASection(String data)\r
-                                           throws DOMException;\r
-\r
-    /**\r
-     * Creates a <code>ProcessingInstruction</code> node given the specified \r
-     * name and data strings.\r
-     * @param targetThe target part of the processing instruction.\r
-     * @param dataThe data for the node.\r
-     * @return The new <code>ProcessingInstruction</code> object.\r
-     * @exception DOMException\r
-     *   INVALID_CHARACTER_ERR: Raised if the specified target contains an \r
-     *   illegal character.\r
-     *   <br>NOT_SUPPORTED_ERR: Raised if this document is an HTML document.\r
-     */\r
-    public ProcessingInstruction createProcessingInstruction(String target, \r
-                                                             String data)\r
-                                                             throws DOMException;\r
-\r
-    /**\r
-     * Creates an <code>Attr</code> of the given name. Note that the \r
-     * <code>Attr</code> instance can then be set on an <code>Element</code> \r
-     * using the <code>setAttributeNode</code> method. \r
-     * <br>To create an attribute with a qualified name and namespace URI, use \r
-     * the <code>createAttributeNS</code> method.\r
-     * @param nameThe name of the attribute.\r
-     * @return A new <code>Attr</code> object with the <code>nodeName</code> \r
-     *   attribute set to <code>name</code>, and <code>localName</code>, \r
-     *   <code>prefix</code>, and <code>namespaceURI</code> set to \r
-     *   <code>null</code>. The value of the attribute is the empty string.\r
-     * @exception DOMException\r
-     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an \r
-     *   illegal character.\r
-     */\r
-    public Attr createAttribute(String name)\r
-                                throws DOMException;\r
-\r
-    /**\r
-     * Creates an <code>EntityReference</code> object. In addition, if the \r
-     * referenced entity is known, the child list of the \r
-     * <code>EntityReference</code> node is made the same as that of the \r
-     * corresponding <code>Entity</code> node.If any descendant of the \r
-     * <code>Entity</code> node has an unbound namespace prefix, the \r
-     * corresponding descendant of the created <code>EntityReference</code> \r
-     * node is also unbound; (its <code>namespaceURI</code> is \r
-     * <code>null</code>). The DOM Level 2 does not support any mechanism to \r
-     * resolve namespace prefixes.\r
-     * @param nameThe name of the entity to reference. \r
-     * @return The new <code>EntityReference</code> object.\r
-     * @exception DOMException\r
-     *   INVALID_CHARACTER_ERR: Raised if the specified name contains an \r
-     *   illegal character.\r
-     *   <br>NOT_SUPPORTED_ERR: Raised if this document is an HTML document.\r
-     */\r
-    public EntityReference createEntityReference(String name)\r
-                                                 throws DOMException;\r
-\r
-    /**\r
-     * Returns a <code>NodeList</code> of all the <code>Elements</code> with a \r
-     * given tag name in the order in which they are encountered in a \r
-     * preorder traversal of the <code>Document</code> tree. \r
-     * @param tagnameThe name of the tag to match on. The special value "*" \r
-     *   matches all tags.\r
-     * @return A new <code>NodeList</code> object containing all the matched \r
-     *   <code>Elements</code>.\r
-     */\r
-    public NodeList getElementsByTagName(String tagname);\r
-\r
-    /**\r
-     * Imports a node from another document to this document. The returned \r
-     * node has no parent; (<code>parentNode</code> is <code>null</code>). \r
-     * The source node is not altered or removed from the original document; \r
-     * this method creates a new copy of the source node.\r
-     * <br>For all nodes, importing a node creates a node object owned by the \r
-     * importing document, with attribute values identical to the source \r
-     * node's <code>nodeName</code> and <code>nodeType</code>, plus the \r
-     * attributes related to namespaces (<code>prefix</code>, \r
-     * <code>localName</code>, and <code>namespaceURI</code>). As in the \r
-     * <code>cloneNode</code> operation on a <code>Node</code>, the source \r
-     * node is not altered.\r
-     * <br>Additional information is copied as appropriate to the \r
-     * <code>nodeType</code>, attempting to mirror the behavior expected if \r
-     * a fragment of XML or HTML source was copied from one document to \r
-     * another, recognizing that the two documents may have different DTDs \r
-     * in the XML case. The following list describes the specifics for each \r
-     * type of node. \r
-     * <dl>\r
-     * <dt>ATTRIBUTE_NODE</dt>\r
-     * <dd>The <code>ownerElement</code> attribute \r
-     * is set to <code>null</code> and the <code>specified</code> flag is \r
-     * set to <code>true</code> on the generated <code>Attr</code>. The \r
-     * descendants of the source <code>Attr</code> are recursively imported \r
-     * and the resulting nodes reassembled to form the corresponding subtree.\r
-     * Note that the <code>deep</code> parameter has no effect on \r
-     * <code>Attr</code> nodes; they always carry their children with them \r
-     * when imported.</dd>\r
-     * <dt>DOCUMENT_FRAGMENT_NODE</dt>\r
-     * <dd>If the <code>deep</code> option \r
-     * was set to <code>true</code>, the descendants of the source element \r
-     * are recursively imported and the resulting nodes reassembled to form \r
-     * the corresponding subtree. Otherwise, this simply generates an empty \r
-     * <code>DocumentFragment</code>.</dd>\r
-     * <dt>DOCUMENT_NODE</dt>\r
-     * <dd><code>Document</code> \r
-     * nodes cannot be imported.</dd>\r
-     * <dt>DOCUMENT_TYPE_NODE</dt>\r
-     * <dd><code>DocumentType</code> \r
-     * nodes cannot be imported.</dd>\r
-     * <dt>ELEMENT_NODE</dt>\r
-     * <dd>Specified attribute nodes of the \r
-     * source element are imported, and the generated <code>Attr</code> \r
-     * nodes are attached to the generated <code>Element</code>. Default \r
-     * attributes are not copied, though if the document being imported into \r
-     * defines default attributes for this element name, those are assigned. \r
-     * If the <code>importNode</code> <code>deep</code> parameter was set to \r
-     * <code>true</code>, the descendants of the source element are \r
-     * recursively imported and the resulting nodes reassembled to form the \r
-     * corresponding subtree.</dd>\r
-     * <dt>ENTITY_NODE</dt>\r
-     * <dd><code>Entity</code> nodes can be \r
-     * imported, however in the current release of the DOM the \r
-     * <code>DocumentType</code> is readonly. Ability to add these imported \r
-     * nodes to a <code>DocumentType</code> will be considered for addition \r
-     * to a future release of the DOM.On import, the <code>publicId</code>, \r
-     * <code>systemId</code>, and <code>notationName</code> attributes are \r
-     * copied. If a <code>deep</code> import is requested, the descendants \r
-     * of the the source <code>Entity</code> are recursively imported and \r
-     * the resulting nodes reassembled to form the corresponding subtree.</dd>\r
-     * <dt>\r
-     * ENTITY_REFERENCE_NODE</dt>\r
-     * <dd>Only the <code>EntityReference</code> itself is \r
-     * copied, even if a <code>deep</code> import is requested, since the \r
-     * source and destination documents might have defined the entity \r
-     * differently. If the document being imported into provides a \r
-     * definition for this entity name, its value is assigned.</dd>\r
-     * <dt>NOTATION_NODE</dt>\r
-     * <dd>\r
-     * <code>Notation</code> nodes can be imported, however in the current \r
-     * release of the DOM the <code>DocumentType</code> is readonly. Ability \r
-     * to add these imported nodes to a <code>DocumentType</code> will be \r
-     * considered for addition to a future release of the DOM.On import, the \r
-     * <code>publicId</code> and <code>systemId</code> attributes are copied.\r
-     * Note that the <code>deep</code> parameter has no effect on \r
-     * <code>Notation</code> nodes since they never have any children.</dd>\r
-     * <dt>\r
-     * PROCESSING_INSTRUCTION_NODE</dt>\r
-     * <dd>The imported node copies its \r
-     * <code>target</code> and <code>data</code> values from those of the \r
-     * source node.</dd>\r
-     * <dt>TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE</dt>\r
-     * <dd>These three \r
-     * types of nodes inheriting from <code>CharacterData</code> copy their \r
-     * <code>data</code> and <code>length</code> attributes from those of \r
-     * the source node.</dd>\r
-     *  \r
-     * @param importedNodeThe node to import.\r
-     * @param deepIf <code>true</code>, recursively import the subtree under \r
-     *   the specified node; if <code>false</code>, import only the node \r
-     *   itself, as explained above. This has no effect on <code>Attr</code>\r
-     *   , <code>EntityReference</code>, and <code>Notation</code> nodes.\r
-     * @return The imported node that belongs to this <code>Document</code>.\r
-     * @exception DOMException\r
-     *   NOT_SUPPORTED_ERR: Raised if the type of node being imported is not \r
-     *   supported.\r
-     * @since DOM Level 2\r
-     */\r
-    public Node importNode(Node importedNode, \r
-                           boolean deep)\r
-                           throws DOMException;\r
-\r
-    /**\r
-     * Creates an element of the given qualified name and namespace URI. \r
-     * HTML-only DOM implementations do not need to implement this method.\r
-     * @param namespaceURIThe namespace URI of the element to create.\r
-     * @param qualifiedNameThe qualified name of the element type to \r
-     *   instantiate.\r
-     * @return A new <code>Element</code> object with the following \r
-     *   attributes:AttributeValue<code>Node.nodeName</code>\r
-     *   <code>qualifiedName</code><code>Node.namespaceURI</code>\r
-     *   <code>namespaceURI</code><code>Node.prefix</code>prefix, extracted \r
-     *   from <code>qualifiedName</code>, or <code>null</code> if there is \r
-     *   no prefix<code>Node.localName</code>local name, extracted from \r
-     *   <code>qualifiedName</code><code>Element.tagName</code>\r
-     *   <code>qualifiedName</code>\r
-     * @exception DOMException\r
-     *   INVALID_CHARACTER_ERR: Raised if the specified qualified name \r
-     *   contains an illegal character.\r
-     *   <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is \r
-     *   malformed, if the <code>qualifiedName</code> has a prefix and the \r
-     *   <code>namespaceURI</code> is <code>null</code>, or if the \r
-     *   <code>qualifiedName</code> has a prefix that is "xml" and the \r
-     *   <code>namespaceURI</code> is different from "\r
-     *   http://www.w3.org/XML/1998/namespace" .\r
-     * @since DOM Level 2\r
-     */\r
-    public Element createElementNS(String namespaceURI, \r
-                                   String qualifiedName)\r
-                                   throws DOMException;\r
-\r
-    /**\r
-     * Creates an attribute of the given qualified name and namespace URI. \r
-     * HTML-only DOM implementations do not need to implement this method.\r
-     * @param namespaceURIThe namespace URI of the attribute to create.\r
-     * @param qualifiedNameThe qualified name of the attribute to instantiate.\r
-     * @return A new <code>Attr</code> object with the following attributes:\r
-     *   AttributeValue<code>Node.nodeName</code>qualifiedName\r
-     *   <code>Node.namespaceURI</code><code>namespaceURI</code>\r
-     *   <code>Node.prefix</code>prefix, extracted from \r
-     *   <code>qualifiedName</code>, or <code>null</code> if there is no \r
-     *   prefix<code>Node.localName</code>local name, extracted from \r
-     *   <code>qualifiedName</code><code>Attr.name</code>\r
-     *   <code>qualifiedName</code><code>Node.nodeValue</code>the empty \r
-     *   string\r
-     * @exception DOMException\r
-     *   INVALID_CHARACTER_ERR: Raised if the specified qualified name \r
-     *   contains an illegal character.\r
-     *   <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is \r
-     *   malformed, if the <code>qualifiedName</code> has a prefix and the \r
-     *   <code>namespaceURI</code> is <code>null</code>, if the \r
-     *   <code>qualifiedName</code> has a prefix that is "xml" and the \r
-     *   <code>namespaceURI</code> is different from "\r
-     *   http://www.w3.org/XML/1998/namespace", or if the \r
-     *   <code>qualifiedName</code> is "xmlns" and the \r
-     *   <code>namespaceURI</code> is different from "\r
-     *   http://www.w3.org/2000/xmlns/".\r
-     * @since DOM Level 2\r
-     */\r
-    public Attr createAttributeNS(String namespaceURI, \r
-                                  String qualifiedName)\r
-                                  throws DOMException;\r
-\r
-    /**\r
-     * Returns a <code>NodeList</code> of all the <code>Elements</code> with a \r
-     * given local name and namespace URI in the order in which they are \r
-     * encountered in a preorder traversal of the <code>Document</code> tree.\r
-     * @param namespaceURIThe namespace URI of the elements to match on. The \r
-     *   special value "*" matches all namespaces.\r
-     * @param localNameThe local name of the elements to match on. The \r
-     *   special value "*" matches all local names.\r
-     * @return A new <code>NodeList</code> object containing all the matched \r
-     *   <code>Elements</code>.\r
-     * @since DOM Level 2\r
-     */\r
-    public NodeList getElementsByTagNameNS(String namespaceURI, \r
-                                           String localName);\r
-\r
-    /**\r
-     * Returns the <code>Element</code> whose <code>ID</code> is given by \r
-     * <code>elementId</code>. If no such element exists, returns \r
-     * <code>null</code>. Behavior is not defined if more than one element \r
-     * has this <code>ID</code>. The DOM implementation must have \r
-     * information that says which attributes are of type ID. Attributes \r
-     * with the name "ID" are not of type ID unless so defined. \r
-     * Implementations that do not know whether attributes are of type ID or \r
-     * not are expected to return <code>null</code>.\r
-     * @param elementIdThe unique <code>id</code> value for an element.\r
-     * @return The matching element.\r
-     * @since DOM Level 2\r
-     */\r
-    public Element getElementById(String elementId);\r
-\r
-}\r