Updated DOM Level 2 Core classes to latest errata. See
http://www.w3.org/2000/11/DOM-Level-2-errata core-18. Javadoc fixes. git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@225921 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c4ca9aa4a8
commit
5ab0e788b4
13
java/external/src/org/w3c/dom/Attr.java
vendored
13
java/external/src/org/w3c/dom/Attr.java
vendored
@ -98,6 +98,19 @@ public interface Attr extends Node {
|
||||
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
|
||||
*/
|
||||
public String getValue();
|
||||
/**
|
||||
* On retrieval, the value of the attribute is returned as a string.
|
||||
* Character and general entity references are replaced with their
|
||||
* values. See also the method <code>getAttribute</code> on the
|
||||
* <code>Element</code> interface.
|
||||
* <br>On setting, this creates a <code>Text</code> node with the unparsed
|
||||
* contents of the string. I.e. any characters that an XML processor
|
||||
* would recognize as markup are instead treated as literal text. See
|
||||
* also the method <code>setAttribute</code> on the <code>Element</code>
|
||||
* interface.
|
||||
* @exception DOMException
|
||||
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
|
||||
*/
|
||||
public void setValue(String value)
|
||||
throws DOMException;
|
||||
|
||||
|
||||
15
java/external/src/org/w3c/dom/CharacterData.java
vendored
15
java/external/src/org/w3c/dom/CharacterData.java
vendored
@ -44,6 +44,21 @@ public interface CharacterData extends Node {
|
||||
*/
|
||||
public String getData()
|
||||
throws DOMException;
|
||||
/**
|
||||
* The character data of the node that implements this interface. The DOM
|
||||
* implementation may not put arbitrary limits on the amount of data
|
||||
* that may be stored in a <code>CharacterData</code> node. However,
|
||||
* implementation limits may mean that the entirety of a node's data may
|
||||
* not fit into a single <code>DOMString</code>. In such cases, the user
|
||||
* may call <code>substringData</code> to retrieve the data in
|
||||
* appropriately sized pieces.
|
||||
* @exception DOMException
|
||||
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
|
||||
* @exception DOMException
|
||||
* DOMSTRING_SIZE_ERR: Raised when it would return more characters than
|
||||
* fit in a <code>DOMString</code> variable on the implementation
|
||||
* platform.
|
||||
*/
|
||||
public void setData(String data)
|
||||
throws DOMException;
|
||||
|
||||
|
||||
@ -26,11 +26,7 @@ public interface DOMImplementation {
|
||||
* specifications and listed in the section. The name must be an XML
|
||||
* name. To avoid possible conflicts, as a convention, names referring
|
||||
* to features defined outside the DOM specification should be made
|
||||
* unique by reversing the name of the Internet domain name of the
|
||||
* person (or the organization that the person belongs to) who defines
|
||||
* the feature, component by component, and using this as a prefix.
|
||||
* For instance, the W3C SVG Working Group defines the feature
|
||||
* "org.w3c.dom.svg".
|
||||
* unique.
|
||||
* @param version This is the version number of the feature to test. In
|
||||
* Level 2, the string can be either "2.0" or "1.0". If the version is
|
||||
* not specified, supporting any version of the feature causes the
|
||||
@ -47,7 +43,6 @@ public interface DOMImplementation {
|
||||
* default attribute additions do not occur. It is expected that a
|
||||
* future version of the DOM will provide a way for populating a
|
||||
* <code>DocumentType</code>.
|
||||
* <br>HTML-only DOM implementations do not need to implement this method.
|
||||
* @param qualifiedName The qualified name of the document type to be
|
||||
* created.
|
||||
* @param publicId The external subset public identifier.
|
||||
@ -59,6 +54,12 @@ public interface DOMImplementation {
|
||||
* contains an illegal character.
|
||||
* <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
|
||||
* malformed.
|
||||
* <br>NOT_SUPPORTED_ERR: May be raised by DOM implementations which do
|
||||
* not support the <code>"XML"</code> feature, if they choose not to
|
||||
* support this method. Other features introduced in the future, by
|
||||
* the DOM WG or in extensions defined by other groups, may also
|
||||
* demand support for this method; please consult the definition of
|
||||
* the feature to see if it requires this method.
|
||||
* @since DOM Level 2
|
||||
*/
|
||||
public DocumentType createDocumentType(String qualifiedName,
|
||||
@ -67,10 +68,10 @@ public interface DOMImplementation {
|
||||
throws DOMException;
|
||||
|
||||
/**
|
||||
* Creates an XML <code>Document</code> object of the specified type with
|
||||
* its document element. HTML-only DOM implementations do not need to
|
||||
* implement this method.
|
||||
* @param namespaceURIThe namespace URI of the document element to create.
|
||||
* Creates a DOM Document object of the specified type with its document
|
||||
* element.
|
||||
* @param namespaceURI The namespace URI of the document element to
|
||||
* create.
|
||||
* @param qualifiedName The qualified name of the document element to be
|
||||
* created.
|
||||
* @param doctype The type of document to be created or <code>null</code>.
|
||||
@ -86,10 +87,19 @@ public interface DOMImplementation {
|
||||
* <code>namespaceURI</code> is <code>null</code>, or if the
|
||||
* <code>qualifiedName</code> has a prefix that is "xml" and the
|
||||
* <code>namespaceURI</code> is different from "
|
||||
* http://www.w3.org/XML/1998/namespace" .
|
||||
* http://www.w3.org/XML/1998/namespace" , or if the DOM
|
||||
* implementation does not support the <code>"XML"</code> feature but
|
||||
* a non-null namespace URI was provided, since namespaces were
|
||||
* defined by XML.
|
||||
* <br>WRONG_DOCUMENT_ERR: Raised if <code>doctype</code> has already
|
||||
* been used with a different document or was created from a different
|
||||
* implementation.
|
||||
* <br>NOT_SUPPORTED_ERR: May be raised by DOM implementations which do
|
||||
* not support the "XML" feature, if they choose not to support this
|
||||
* method. Other features introduced in the future, by the DOM WG or
|
||||
* in extensions defined by other groups, may also demand support for
|
||||
* this method; please consult the definition of the feature to see if
|
||||
* it requires this method.
|
||||
* @since DOM Level 2
|
||||
*/
|
||||
public Document createDocument(String namespaceURI,
|
||||
|
||||
107
java/external/src/org/w3c/dom/Document.java
vendored
107
java/external/src/org/w3c/dom/Document.java
vendored
@ -255,7 +255,7 @@ public interface Document extends Node {
|
||||
* types of nodes inheriting from <code>CharacterData</code> copy their
|
||||
* <code>data</code> and <code>length</code> attributes from those of
|
||||
* the source node.</dd>
|
||||
*
|
||||
* </dl>
|
||||
* @param importedNode The node to import.
|
||||
* @param deep If <code>true</code>, recursively import the subtree under
|
||||
* the specified node; if <code>false</code>, import only the node
|
||||
@ -273,27 +273,56 @@ public interface Document extends Node {
|
||||
|
||||
/**
|
||||
* Creates an element of the given qualified name and namespace URI.
|
||||
* HTML-only DOM implementations do not need to implement this method.
|
||||
* @param namespaceURI The namespace URI of the element to create.
|
||||
* @param qualifiedName The qualified name of the element type to
|
||||
* instantiate.
|
||||
* @return A new <code>Element</code> object with the following
|
||||
* attributes:AttributeValue<code>Node.nodeName</code>
|
||||
* <code>qualifiedName</code><code>Node.namespaceURI</code>
|
||||
* <code>namespaceURI</code><code>Node.prefix</code>prefix, extracted
|
||||
* attributes:
|
||||
* <table border='1'>
|
||||
* <tr>
|
||||
* <th>Attribute</th>
|
||||
* <th>Value</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'><code>Node.nodeName</code></td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>
|
||||
* <code>qualifiedName</code></td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'><code>Node.namespaceURI</code></td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>
|
||||
* <code>namespaceURI</code></td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'><code>Node.prefix</code></td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>prefix, extracted
|
||||
* from <code>qualifiedName</code>, or <code>null</code> if there is
|
||||
* no prefix<code>Node.localName</code>local name, extracted from
|
||||
* <code>qualifiedName</code><code>Element.tagName</code>
|
||||
* <code>qualifiedName</code>
|
||||
* no prefix</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'><code>Node.localName</code></td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>local name, extracted from
|
||||
* <code>qualifiedName</code></td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'><code>Element.tagName</code></td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>
|
||||
* <code>qualifiedName</code></td>
|
||||
* </tr>
|
||||
* </table>
|
||||
* @exception DOMException
|
||||
* INVALID_CHARACTER_ERR: Raised if the specified qualified name
|
||||
* contains an illegal character.
|
||||
* contains an illegal character, per the XML 1.0 specification .
|
||||
* <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
|
||||
* malformed, if the <code>qualifiedName</code> has a prefix and the
|
||||
* malformed per the Namespaces in XML specification, if the
|
||||
* <code>qualifiedName</code> has a prefix and the
|
||||
* <code>namespaceURI</code> is <code>null</code>, or if the
|
||||
* <code>qualifiedName</code> has a prefix that is "xml" and the
|
||||
* <code>namespaceURI</code> is different from "
|
||||
* http://www.w3.org/XML/1998/namespace" .
|
||||
* <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
|
||||
* support the <code>"XML"</code> feature, since namespaces were
|
||||
* defined by XML.
|
||||
* @since DOM Level 2
|
||||
*/
|
||||
public Element createElementNS(String namespaceURI,
|
||||
@ -302,30 +331,64 @@ public interface Document extends Node {
|
||||
|
||||
/**
|
||||
* Creates an attribute of the given qualified name and namespace URI.
|
||||
* HTML-only DOM implementations do not need to implement this method.
|
||||
* @param namespaceURI The namespace URI of the attribute to create.
|
||||
* @param qualifiedNameThe qualified name of the attribute to instantiate.
|
||||
* @param qualifiedName The qualified name of the attribute to
|
||||
* instantiate.
|
||||
* @return A new <code>Attr</code> object with the following attributes:
|
||||
* AttributeValue<code>Node.nodeName</code>qualifiedName
|
||||
* <code>Node.namespaceURI</code><code>namespaceURI</code>
|
||||
* <code>Node.prefix</code>prefix, extracted from
|
||||
* <table border='1'>
|
||||
* <tr>
|
||||
* <th>
|
||||
* Attribute</th>
|
||||
* <th>Value</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'><code>Node.nodeName</code></td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>qualifiedName</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'>
|
||||
* <code>Node.namespaceURI</code></td>
|
||||
* <td valign='top' rowspan='1' colspan='1'><code>namespaceURI</code></td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'>
|
||||
* <code>Node.prefix</code></td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>prefix, extracted from
|
||||
* <code>qualifiedName</code>, or <code>null</code> if there is no
|
||||
* prefix<code>Node.localName</code>local name, extracted from
|
||||
* <code>qualifiedName</code><code>Attr.name</code>
|
||||
* <code>qualifiedName</code><code>Node.nodeValue</code>the empty
|
||||
* string
|
||||
* prefix</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'><code>Node.localName</code></td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>local name, extracted from
|
||||
* <code>qualifiedName</code></td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'><code>Attr.name</code></td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>
|
||||
* <code>qualifiedName</code></td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'><code>Node.nodeValue</code></td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>the empty
|
||||
* string</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
* @exception DOMException
|
||||
* INVALID_CHARACTER_ERR: Raised if the specified qualified name
|
||||
* contains an illegal character.
|
||||
* contains an illegal character, per the XML 1.0 specification .
|
||||
* <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
|
||||
* malformed, if the <code>qualifiedName</code> has a prefix and the
|
||||
* malformed per the Namespaces in XML specification, if the
|
||||
* <code>qualifiedName</code> has a prefix and the
|
||||
* <code>namespaceURI</code> is <code>null</code>, if the
|
||||
* <code>qualifiedName</code> has a prefix that is "xml" and the
|
||||
* <code>namespaceURI</code> is different from "
|
||||
* http://www.w3.org/XML/1998/namespace", or if the
|
||||
* <code>qualifiedName</code> is "xmlns" and the
|
||||
* <code>qualifiedName</code>, or its prefix, is "xmlns" and the
|
||||
* <code>namespaceURI</code> is different from "
|
||||
* http://www.w3.org/2000/xmlns/".
|
||||
* <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
|
||||
* support the <code>"XML"</code> feature, since namespaces were
|
||||
* defined by XML.
|
||||
* @since DOM Level 2
|
||||
*/
|
||||
public Attr createAttributeNS(String namespaceURI,
|
||||
|
||||
@ -68,10 +68,11 @@ public interface DocumentType extends Node {
|
||||
public String getSystemId();
|
||||
|
||||
/**
|
||||
* The internal subset as a string.The actual content returned depends on
|
||||
* how much information is available to the implementation. This may
|
||||
* vary depending on various parameters, including the XML processor
|
||||
* used to build the document.
|
||||
* The internal subset as a string, or <code>null</code> if there is none.
|
||||
* This is does not contain the delimiting square brackets.The actual
|
||||
* content returned depends on how much information is available to the
|
||||
* implementation. This may vary depending on various parameters,
|
||||
* including the XML processor used to build the document.
|
||||
* @since DOM Level 2
|
||||
*/
|
||||
public String getInternalSubset();
|
||||
|
||||
44
java/external/src/org/w3c/dom/Element.java
vendored
44
java/external/src/org/w3c/dom/Element.java
vendored
@ -151,8 +151,11 @@ public interface Element extends Node {
|
||||
public NodeList getElementsByTagName(String name);
|
||||
|
||||
/**
|
||||
* Retrieves an attribute value by local name and namespace URI. HTML-only
|
||||
* DOM implementations do not need to implement this method.
|
||||
* Retrieves an attribute value by local name and namespace URI.
|
||||
* <br>Documents which do not support the "XML" feature will permit only
|
||||
* the DOM Level 1 calls for creating/setting elements and attributes.
|
||||
* Hence, if you specify a non-null namespace URI, these DOMs will never
|
||||
* find a matching node.
|
||||
* @param namespaceURI The namespace URI of the attribute to retrieve.
|
||||
* @param localName The local name of the attribute to retrieve.
|
||||
* @return The <code>Attr</code> value as a string, or the empty string
|
||||
@ -177,7 +180,6 @@ public interface Element extends Node {
|
||||
* and use <code>setAttributeNodeNS</code> or
|
||||
* <code>setAttributeNode</code> to assign it as the value of an
|
||||
* attribute.
|
||||
* <br>HTML-only DOM implementations do not need to implement this method.
|
||||
* @param namespaceURI The namespace URI of the attribute to create or
|
||||
* alter.
|
||||
* @param qualifiedName The qualified name of the attribute to create or
|
||||
@ -185,17 +187,21 @@ public interface Element extends Node {
|
||||
* @param value The value to set in string form.
|
||||
* @exception DOMException
|
||||
* INVALID_CHARACTER_ERR: Raised if the specified qualified name
|
||||
* contains an illegal character.
|
||||
* contains an illegal character, per the XML 1.0 specification .
|
||||
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
|
||||
* <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
|
||||
* malformed, if the <code>qualifiedName</code> has a prefix and the
|
||||
* malformed per the Namespaces in XML specification, if the
|
||||
* <code>qualifiedName</code> has a prefix and the
|
||||
* <code>namespaceURI</code> is <code>null</code>, if the
|
||||
* <code>qualifiedName</code> has a prefix that is "xml" and the
|
||||
* <code>namespaceURI</code> is different from "
|
||||
* http://www.w3.org/XML/1998/namespace", or if the
|
||||
* <code>qualifiedName</code> is "xmlns" and the
|
||||
* <code>qualifiedName</code>, or its prefix, is "xmlns" and the
|
||||
* <code>namespaceURI</code> is different from "
|
||||
* http://www.w3.org/2000/xmlns/".
|
||||
* <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
|
||||
* support the <code>"XML"</code> feature, since namespaces were
|
||||
* defined by XML.
|
||||
* @since DOM Level 2
|
||||
*/
|
||||
public void setAttributeNS(String namespaceURI,
|
||||
@ -208,7 +214,10 @@ public interface Element extends Node {
|
||||
* attribute has a default value it is immediately replaced. The
|
||||
* replacing attribute has the same namespace URI and local name, as
|
||||
* well as the original prefix.
|
||||
* <br>HTML-only DOM implementations do not need to implement this method.
|
||||
* <br>Documents which do not support the "XML" feature will permit only
|
||||
* the DOM Level 1 calls for creating/setting elements and attributes.
|
||||
* Hence, if you specify a non-null namespace URI, these DOMs will never
|
||||
* find a matching node.
|
||||
* @param namespaceURI The namespace URI of the attribute to remove.
|
||||
* @param localName The local name of the attribute to remove.
|
||||
* @exception DOMException
|
||||
@ -221,7 +230,10 @@ public interface Element extends Node {
|
||||
|
||||
/**
|
||||
* Retrieves an <code>Attr</code> node by local name and namespace URI.
|
||||
* HTML-only DOM implementations do not need to implement this method.
|
||||
* <br>Documents which do not support the "XML" feature will permit only
|
||||
* the DOM Level 1 calls for creating/setting elements and attributes.
|
||||
* Hence, if you specify a non-null namespace URI, these DOMs will never
|
||||
* find a matching node.
|
||||
* @param namespaceURI The namespace URI of the attribute to retrieve.
|
||||
* @param localName The local name of the attribute to retrieve.
|
||||
* @return The <code>Attr</code> node with the specified attribute local
|
||||
@ -236,7 +248,6 @@ public interface Element extends Node {
|
||||
* Adds a new attribute. If an attribute with that local name and that
|
||||
* namespace URI is already present in the element, it is replaced by
|
||||
* the new one.
|
||||
* <br>HTML-only DOM implementations do not need to implement this method.
|
||||
* @param newAttr The <code>Attr</code> node to add to the attribute list.
|
||||
* @return If the <code>newAttr</code> attribute replaces an existing
|
||||
* attribute with the same local name and namespace URI, the replaced
|
||||
@ -250,6 +261,9 @@ public interface Element extends Node {
|
||||
* attribute of another <code>Element</code> object. The DOM user must
|
||||
* explicitly clone <code>Attr</code> nodes to re-use them in other
|
||||
* elements.
|
||||
* <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
|
||||
* support the <code>"XML"</code> feature, since namespaces were
|
||||
* defined by XML.
|
||||
* @since DOM Level 2
|
||||
*/
|
||||
public Attr setAttributeNodeNS(Attr newAttr)
|
||||
@ -260,7 +274,10 @@ public interface Element extends Node {
|
||||
* <code>Elements</code> with a given local name and namespace URI in
|
||||
* the order in which they are encountered in a preorder traversal of
|
||||
* this <code>Element</code> tree.
|
||||
* <br>HTML-only DOM implementations do not need to implement this method.
|
||||
* <br>Documents which do not support the "XML" feature will permit only
|
||||
* the DOM Level 1 calls for creating/setting elements and attributes.
|
||||
* Hence, if you specify a non-null namespace URI, these DOMs will never
|
||||
* find a matching node.
|
||||
* @param namespaceURI The namespace URI of the elements to match on. The
|
||||
* special value "*" matches all namespaces.
|
||||
* @param localName The local name of the elements to match on. The
|
||||
@ -287,8 +304,11 @@ public interface Element extends Node {
|
||||
/**
|
||||
* Returns <code>true</code> when an attribute with a given local name and
|
||||
* namespace URI is specified on this element or has a default value,
|
||||
* <code>false</code> otherwise. HTML-only DOM implementations do not
|
||||
* need to implement this method.
|
||||
* <code>false</code> otherwise.
|
||||
* <br>Documents which do not support the "XML" feature will permit only
|
||||
* the DOM Level 1 calls for creating/setting elements and attributes.
|
||||
* Hence, if you specify a non-null namespace URI, these DOMs will never
|
||||
* find a matching node.
|
||||
* @param namespaceURI The namespace URI of the attribute to look for.
|
||||
* @param localName The local name of the attribute to look for.
|
||||
* @return <code>true</code> if an attribute with the given local name
|
||||
|
||||
26
java/external/src/org/w3c/dom/NamedNodeMap.java
vendored
26
java/external/src/org/w3c/dom/NamedNodeMap.java
vendored
@ -56,6 +56,11 @@ public interface NamedNodeMap {
|
||||
* <code>Attr</code> that is already an attribute of another
|
||||
* <code>Element</code> object. The DOM user must explicitly clone
|
||||
* <code>Attr</code> nodes to re-use them in other elements.
|
||||
* <br>HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node
|
||||
* doesn't belong in this NamedNodeMap. Examples would include trying
|
||||
* to insert something other than an Attr node into an Element's map
|
||||
* of attributes, or a non-Entity node into the DocumentType's map of
|
||||
* Entities.
|
||||
*/
|
||||
public Node setNamedItem(Node arg)
|
||||
throws DOMException;
|
||||
@ -94,8 +99,11 @@ public interface NamedNodeMap {
|
||||
public int getLength();
|
||||
|
||||
/**
|
||||
* Retrieves a node specified by local name and namespace URI. HTML-only
|
||||
* DOM implementations do not need to implement this method.
|
||||
* Retrieves a node specified by local name and namespace URI.
|
||||
* <br>Documents which do not support the "XML" feature will permit only
|
||||
* the DOM Level 1 calls for creating/setting elements and attributes.
|
||||
* Hence, if you specify a non-null namespace URI, these DOMs will never
|
||||
* find a matching node.
|
||||
* @param namespaceURI The namespace URI of the node to retrieve.
|
||||
* @param localName The local name of the node to retrieve.
|
||||
* @return A <code>Node</code> (of any type) with the specified local
|
||||
@ -111,7 +119,6 @@ public interface NamedNodeMap {
|
||||
* <code>localName</code>. If a node with that namespace URI and that
|
||||
* local name is already present in this map, it is replaced by the new
|
||||
* one.
|
||||
* <br>HTML-only DOM implementations do not need to implement this method.
|
||||
* @param arg A node to store in this map. The node will later be
|
||||
* accessible using the value of its <code>namespaceURI</code> and
|
||||
* <code>localName</code> attributes.
|
||||
@ -126,6 +133,14 @@ public interface NamedNodeMap {
|
||||
* <code>Attr</code> that is already an attribute of another
|
||||
* <code>Element</code> object. The DOM user must explicitly clone
|
||||
* <code>Attr</code> nodes to re-use them in other elements.
|
||||
* <br>HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node
|
||||
* doesn't belong in this NamedNodeMap. Examples would include trying
|
||||
* to insert something other than an Attr node into an Element's map
|
||||
* of attributes, or a non-Entity node into the DocumentType's map of
|
||||
* Entities.
|
||||
* <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
|
||||
* support the <code>"XML"</code> feature, since namespaces were
|
||||
* defined by XML.
|
||||
* @since DOM Level 2
|
||||
*/
|
||||
public Node setNamedItemNS(Node arg)
|
||||
@ -138,7 +153,10 @@ public interface NamedNodeMap {
|
||||
* attribute of the <code>Node</code> interface. If so, an attribute
|
||||
* immediately appears containing the default value as well as the
|
||||
* corresponding namespace URI, local name, and prefix when applicable.
|
||||
* <br>HTML-only DOM implementations do not need to implement this method.
|
||||
* <br>Documents which do not support the "XML" feature will permit only
|
||||
* the DOM Level 1 calls for creating/setting elements and attributes.
|
||||
* Hence, if you specify a non-null namespace URI, these DOMs will never
|
||||
* find a matching node.
|
||||
* @param namespaceURI The namespace URI of the node to remove.
|
||||
* @param localName The local name of the node to remove.
|
||||
* @return The node removed from this map if a node with such a local
|
||||
|
||||
168
java/external/src/org/w3c/dom/Node.java
vendored
168
java/external/src/org/w3c/dom/Node.java
vendored
@ -29,6 +29,97 @@ package org.w3c.dom;
|
||||
* ), this returns <code>null</code>. Note that the specialized interfaces
|
||||
* may contain additional and more convenient mechanisms to get and set the
|
||||
* relevant information.
|
||||
* <p>The values of <code>nodeName</code>,
|
||||
* <code>nodeValue</code>, and <code>attributes</code> vary according to the
|
||||
* node type as follows:
|
||||
* <table border='1'>
|
||||
* <tr>
|
||||
* <th>Interface</th>
|
||||
* <th>nodeName</th>
|
||||
* <th>nodeValue</th>
|
||||
* <th>attributes</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'>Attr</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>name of
|
||||
* attribute</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>value of attribute</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>null</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'>CDATASection</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'><code>"#cdata-section"</code></td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>
|
||||
* content of the CDATA Section</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>null</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'>Comment</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'><code>"#comment"</code></td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>content of
|
||||
* the comment</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>null</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'>Document</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'><code>"#document"</code></td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>null</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>null</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'>DocumentFragment</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>
|
||||
* <code>"#document-fragment"</code></td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>null</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>null</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'>DocumentType</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>document type name</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>
|
||||
* null</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>null</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'>Element</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>tag name</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>null</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>NamedNodeMap</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'>Entity</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>entity name</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>null</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>null</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'>
|
||||
* EntityReference</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>name of entity referenced</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>null</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>null</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'>Notation</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>notation name</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>null</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>
|
||||
* null</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'>ProcessingInstruction</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>target</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>entire content excluding the target</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>null</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td valign='top' rowspan='1' colspan='1'>Text</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>
|
||||
* <code>"#text"</code></td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>content of the text node</td>
|
||||
* <td valign='top' rowspan='1' colspan='1'>null</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
* <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>.
|
||||
*/
|
||||
public interface Node {
|
||||
@ -99,6 +190,16 @@ public interface Node {
|
||||
*/
|
||||
public String getNodeValue()
|
||||
throws DOMException;
|
||||
/**
|
||||
* The value of this node, depending on its type; see the table above.
|
||||
* When it is defined to be <code>null</code>, setting it has no effect.
|
||||
* @exception DOMException
|
||||
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
|
||||
* @exception DOMException
|
||||
* DOMSTRING_SIZE_ERR: Raised when it would return more characters than
|
||||
* fit in a <code>DOMString</code> variable on the implementation
|
||||
* platform.
|
||||
*/
|
||||
public void setNodeValue(String nodeValue)
|
||||
throws DOMException;
|
||||
|
||||
@ -173,13 +274,14 @@ public interface Node {
|
||||
* <code>refChild</code>. If the <code>newChild</code> is already in the
|
||||
* tree, it is first removed.
|
||||
* @param newChild The node to insert.
|
||||
* @param refChildThe reference node, i.e., the node before which the new
|
||||
* node must be inserted.
|
||||
* @param refChild The reference node, i.e., the node before which the
|
||||
* new node must be inserted.
|
||||
* @return The node being inserted.
|
||||
* @exception DOMException
|
||||
* HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
|
||||
* allow children of the type of the <code>newChild</code> node, or if
|
||||
* the node to insert is one of this node's ancestors.
|
||||
* the node to insert is one of this node's ancestors or this node
|
||||
* itself.
|
||||
* <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created
|
||||
* from a different document than the one that created this node.
|
||||
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or
|
||||
@ -205,7 +307,8 @@ public interface Node {
|
||||
* @exception DOMException
|
||||
* HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
|
||||
* allow children of the type of the <code>newChild</code> node, or if
|
||||
* the node to put in is one of this node's ancestors.
|
||||
* the node to put in is one of this node's ancestors or this node
|
||||
* itself.
|
||||
* <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created
|
||||
* from a different document than the one that created this node.
|
||||
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent of
|
||||
@ -234,17 +337,19 @@ public interface Node {
|
||||
* Adds the node <code>newChild</code> to the end of the list of children
|
||||
* of this node. If the <code>newChild</code> is already in the tree, it
|
||||
* is first removed.
|
||||
* @param newChildThe node to add.If it is a <code>DocumentFragment</code>
|
||||
* object, the entire contents of the document fragment are moved
|
||||
* into the child list of this node
|
||||
* @param newChild The node to add.If it is a
|
||||
* <code>DocumentFragment</code> object, the entire contents of the
|
||||
* document fragment are moved into the child list of this node
|
||||
* @return The node added.
|
||||
* @exception DOMException
|
||||
* HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
|
||||
* allow children of the type of the <code>newChild</code> node, or if
|
||||
* the node to append is one of this node's ancestors.
|
||||
* the node to append is one of this node's ancestors or this node
|
||||
* itself.
|
||||
* <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created
|
||||
* from a different document than the one that created this node.
|
||||
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
|
||||
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or
|
||||
* if the previous parent of the node being inserted is readonly.
|
||||
*/
|
||||
public Node appendChild(Node newChild)
|
||||
throws DOMException;
|
||||
@ -352,20 +457,51 @@ public interface Node {
|
||||
* <code>Document</code> interface, this is always <code>null</code>.
|
||||
* @exception DOMException
|
||||
* INVALID_CHARACTER_ERR: Raised if the specified prefix contains an
|
||||
* illegal character.
|
||||
* illegal character, per the XML 1.0 specification .
|
||||
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
|
||||
* <br>NAMESPACE_ERR: Raised if the specified <code>prefix</code> is
|
||||
* malformed, if the <code>namespaceURI</code> of this node is
|
||||
* <code>null</code>, if the specified prefix is "xml" and the
|
||||
* <code>namespaceURI</code> of this node is different from "
|
||||
* http://www.w3.org/XML/1998/namespace", if this node is an attribute
|
||||
* and the specified prefix is "xmlns" and the
|
||||
* <code>namespaceURI</code> of this node is different from "
|
||||
* malformed per the Namespaces in XML specification, if the
|
||||
* <code>namespaceURI</code> of this node is <code>null</code>, if the
|
||||
* specified prefix is "xml" and the <code>namespaceURI</code> of this
|
||||
* node is different from "http://www.w3.org/XML/1998/namespace", if
|
||||
* this node is an attribute and the specified prefix is "xmlns" and
|
||||
* the <code>namespaceURI</code> of this node is different from "
|
||||
* http://www.w3.org/2000/xmlns/", or if this node is an attribute and
|
||||
* the <code>qualifiedName</code> of this node is "xmlns" .
|
||||
* @since DOM Level 2
|
||||
*/
|
||||
public String getPrefix();
|
||||
/**
|
||||
* The namespace prefix of this node, or <code>null</code> if it is
|
||||
* unspecified.
|
||||
* <br>Note that setting this attribute, when permitted, changes the
|
||||
* <code>nodeName</code> attribute, which holds the qualified name, as
|
||||
* well as the <code>tagName</code> and <code>name</code> attributes of
|
||||
* the <code>Element</code> and <code>Attr</code> interfaces, when
|
||||
* applicable.
|
||||
* <br>Note also that changing the prefix of an attribute that is known to
|
||||
* have a default value, does not make a new attribute with the default
|
||||
* value and the original prefix appear, since the
|
||||
* <code>namespaceURI</code> and <code>localName</code> do not change.
|
||||
* <br>For nodes of any type other than <code>ELEMENT_NODE</code> and
|
||||
* <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1
|
||||
* method, such as <code>createElement</code> from the
|
||||
* <code>Document</code> interface, this is always <code>null</code>.
|
||||
* @exception DOMException
|
||||
* INVALID_CHARACTER_ERR: Raised if the specified prefix contains an
|
||||
* illegal character, per the XML 1.0 specification .
|
||||
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
|
||||
* <br>NAMESPACE_ERR: Raised if the specified <code>prefix</code> is
|
||||
* malformed per the Namespaces in XML specification, if the
|
||||
* <code>namespaceURI</code> of this node is <code>null</code>, if the
|
||||
* specified prefix is "xml" and the <code>namespaceURI</code> of this
|
||||
* node is different from "http://www.w3.org/XML/1998/namespace", if
|
||||
* this node is an attribute and the specified prefix is "xmlns" and
|
||||
* the <code>namespaceURI</code> of this node is different from "
|
||||
* http://www.w3.org/2000/xmlns/", or if this node is an attribute and
|
||||
* the <code>qualifiedName</code> of this node is "xmlns" .
|
||||
* @since DOM Level 2
|
||||
*/
|
||||
public void setPrefix(String prefix)
|
||||
throws DOMException;
|
||||
|
||||
|
||||
@ -34,6 +34,13 @@ public interface ProcessingInstruction extends Node {
|
||||
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
|
||||
*/
|
||||
public String getData();
|
||||
/**
|
||||
* The content of this processing instruction. This is from the first non
|
||||
* white space character after the target to the character immediately
|
||||
* preceding the <code>?></code>.
|
||||
* @exception DOMException
|
||||
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
|
||||
*/
|
||||
public void setData(String data)
|
||||
throws DOMException;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user