You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by el...@apache.org on 2002/04/04 17:35:10 UTC
cvs commit: xml-xerces/java/src/org/w3c/dom/traversal DocumentTraversal.java NodeFilter.java NodeIterator.java TreeWalker.java
elena 02/04/04 07:35:10
Modified: java/src/org/w3c/dom Attr.java CDATASection.java
CharacterData.java DOMException.java
DOMImplementation.java Document.java
DocumentType.java Element.java Entity.java
NamedNodeMap.java Node.java NodeList.java
ProcessingInstruction.java Text.java
java/src/org/w3c/dom/events DocumentEvent.java Event.java
EventListener.java EventTarget.java
MutationEvent.java
java/src/org/w3c/dom/ranges Range.java
java/src/org/w3c/dom/traversal DocumentTraversal.java
NodeFilter.java NodeIterator.java TreeWalker.java
Log:
The documentations in the Java source files contained errors and
formatting issues. Updated interfaces using published zips on DOM Level 2
Errata page: http://www.w3.org/2000/11/DOM-Level-2-errata
Revision Changes Path
1.6 +22 -9 xml-xerces/java/src/org/w3c/dom/Attr.java
Index: Attr.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/Attr.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Attr.java 13 Nov 2000 18:15:11 -0000 1.5
+++ Attr.java 4 Apr 2002 15:35:09 -0000 1.6
@@ -13,7 +13,7 @@
package org.w3c.dom;
/**
- * The <code>Attr</code> interface represents an attribute in an
+ * The <code>Attr</code> interface represents an attribute in an
* <code>Element</code> object. Typically the allowable values for the
* attribute are defined in a document type definition.
* <p><code>Attr</code> objects inherit the <code>Node</code> interface, but
@@ -33,7 +33,7 @@
* DOM need to be aware that <code>Attr</code> nodes have some things in
* common with other objects inheriting the <code>Node</code> interface, but
* they also are quite distinct.
- * <p> The attribute's effective value is determined as follows: if this
+ * <p>The attribute's effective value is determined as follows: if this
* attribute has been explicitly assigned any value, that value is the
* attribute's effective value; otherwise, if there is a declaration for
* this attribute, and that declaration includes a default value, then that
@@ -41,19 +41,19 @@
* attribute does not exist on this element in the structure model until it
* has been explicitly added. Note that the <code>nodeValue</code> attribute
* on the <code>Attr</code> instance can also be used to retrieve the string
- * version of the attribute's value(s).
+ * version of the attribute's value(s).
* <p>In XML, where the value of an attribute can contain entity references,
* the child nodes of the <code>Attr</code> node may be either
* <code>Text</code> or <code>EntityReference</code> nodes (when these are
* in use; see the description of <code>EntityReference</code> for
* discussion). Because the DOM Core is not aware of attribute types, it
* treats all attribute values as simple strings, even if the DTD or schema
- * declares them as having tokenized types.
+ * declares them as having tokenized types.
* <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 Attr extends Node {
/**
- * Returns the name of this attribute.
+ * Returns the name of this attribute.
*/
public String getName();
@@ -69,14 +69,14 @@
* implementation will then make a new attribute available with
* <code>specified</code> set to <code>false</code> and the default
* value (if one exists).
- * <br>In summary: If the attribute has an assigned value in the document
+ * <br>In summary: If the attribute has an assigned value in the document
* then <code>specified</code> is <code>true</code>, and the value is
- * the assigned value. If the attribute has no assigned value in the
+ * the assigned value.If the attribute has no assigned value in the
* document and has a default value in the DTD, then
* <code>specified</code> is <code>false</code>, and the value is the
- * default value in the DTD. If the attribute has no assigned value in
+ * default value in the DTD.If the attribute has no assigned value in
* the document and has a value of #IMPLIED in the DTD, then the
- * attribute does not appear in the structure model of the document. If
+ * attribute does not appear in the structure model of the document.If
* the <code>ownerElement</code> attribute is <code>null</code> (i.e.
* because it was just created or was set to <code>null</code> by the
* various removal and cloning operations) <code>specified</code> is
@@ -98,6 +98,19 @@
* 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;
1.6 +2 -2 xml-xerces/java/src/org/w3c/dom/CDATASection.java
Index: CDATASection.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/CDATASection.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- CDATASection.java 13 Nov 2000 18:15:11 -0000 1.5
+++ CDATASection.java 4 Apr 2002 15:35:09 -0000 1.6
@@ -24,8 +24,8 @@
* contain characters that need to be escaped outside of CDATA sections and
* that, depending on the character encoding ("charset") chosen for
* serialization, it may be impossible to write out some characters as part
- * of a CDATA section.
- * <p> The <code>CDATASection</code> interface inherits from the
+ * of a CDATA section.
+ * <p>The <code>CDATASection</code> interface inherits from the
* <code>CharacterData</code> interface through the <code>Text</code>
* interface. Adjacent <code>CDATASection</code> nodes are not merged by use
* of the <code>normalize</code> method of the <code>Node</code> interface.
1.6 +25 -10 xml-xerces/java/src/org/w3c/dom/CharacterData.java
Index: CharacterData.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/CharacterData.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- CharacterData.java 13 Nov 2000 18:15:12 -0000 1.5
+++ CharacterData.java 4 Apr 2002 15:35:09 -0000 1.6
@@ -44,6 +44,21 @@
*/
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;
@@ -56,8 +71,8 @@
/**
* Extracts a range of data from the node.
- * @param offsetStart offset of substring to extract.
- * @param countThe number of 16-bit units to extract.
+ * @param offset Start offset of substring to extract.
+ * @param count The number of 16-bit units to extract.
* @return The specified substring. If the sum of <code>offset</code> and
* <code>count</code> exceeds the <code>length</code>, then all 16-bit
* units to the end of the data are returned.
@@ -77,7 +92,7 @@
* Append the string to the end of the character data of the node. Upon
* success, <code>data</code> provides access to the concatenation of
* <code>data</code> and the <code>DOMString</code> specified.
- * @param argThe <code>DOMString</code> to append.
+ * @param arg The <code>DOMString</code> to append.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
@@ -86,8 +101,8 @@
/**
* Insert a string at the specified 16-bit unit offset.
- * @param offsetThe character offset at which to insert.
- * @param argThe <code>DOMString</code> to insert.
+ * @param offset The character offset at which to insert.
+ * @param arg The <code>DOMString</code> to insert.
* @exception DOMException
* INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
* negative or greater than the number of 16-bit units in
@@ -101,8 +116,8 @@
/**
* Remove a range of 16-bit units from the node. Upon success,
* <code>data</code> and <code>length</code> reflect the change.
- * @param offsetThe offset from which to start removing.
- * @param countThe number of 16-bit units to delete. If the sum of
+ * @param offset The offset from which to start removing.
+ * @param count The number of 16-bit units to delete. If the sum of
* <code>offset</code> and <code>count</code> exceeds
* <code>length</code> then all 16-bit units from <code>offset</code>
* to the end of the data are deleted.
@@ -120,14 +135,14 @@
/**
* Replace the characters starting at the specified 16-bit unit offset
* with the specified string.
- * @param offsetThe offset from which to start replacing.
- * @param countThe number of 16-bit units to replace. If the sum of
+ * @param offset The offset from which to start replacing.
+ * @param count The number of 16-bit units to replace. If the sum of
* <code>offset</code> and <code>count</code> exceeds
* <code>length</code>, then all 16-bit units to the end of the data
* are replaced; (i.e., the effect is the same as a <code>remove</code>
* method call with the same range, followed by an <code>append</code>
* method invocation).
- * @param argThe <code>DOMString</code> with which the range must be
+ * @param arg The <code>DOMString</code> with which the range must be
* replaced.
* @exception DOMException
* INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
1.7 +2 -2 xml-xerces/java/src/org/w3c/dom/DOMException.java
Index: DOMException.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/DOMException.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DOMException.java 13 Nov 2000 18:15:13 -0000 1.6
+++ DOMException.java 4 Apr 2002 15:35:09 -0000 1.7
@@ -18,10 +18,10 @@
* because data is lost, or because the implementation has become unstable).
* In general, DOM methods return specific error values in ordinary
* processing situations, such as out-of-bound errors when using
- * <code>NodeList</code>.
+ * <code>NodeList</code>.
* <p>Implementations should raise other exceptions under other circumstances.
* For example, implementations should raise an implementation-dependent
- * exception if a <code>null</code> argument is passed.
+ * exception if a <code>null</code> argument is passed.
* <p>Some languages and object systems do not support the concept of
* exceptions. For such systems, error conditions may be indicated using
* native error reporting mechanisms. For some bindings, for example,
1.7 +29 -19 xml-xerces/java/src/org/w3c/dom/DOMImplementation.java
Index: DOMImplementation.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/DOMImplementation.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DOMImplementation.java 13 Nov 2000 18:15:13 -0000 1.6
+++ DOMImplementation.java 4 Apr 2002 15:35:09 -0000 1.7
@@ -21,17 +21,13 @@
public interface DOMImplementation {
/**
* Test if the DOM implementation implements a specific feature.
- * @param featureThe name of the feature to test (case-insensitive). The
+ * @param feature The name of the feature to test (case-insensitive). The
* values used by DOM features are defined throughout the DOM Level 2
* 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".
- * @param versionThis is the version number of the feature to test. In
+ * 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
* method to return <code>true</code>.
@@ -47,11 +43,10 @@
* 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 qualifiedNameThe qualified name of the document type to be
- * created.
- * @param publicIdThe external subset public identifier.
- * @param systemIdThe external subset system identifier.
+ * @param qualifiedName The qualified name of the document type to be
+ * created.
+ * @param publicId The external subset public identifier.
+ * @param systemId The external subset system identifier.
* @return A new <code>DocumentType</code> node with
* <code>Node.ownerDocument</code> set to <code>null</code>.
* @exception DOMException
@@ -59,6 +54,12 @@
* 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,13 +68,13 @@
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.
- * @param qualifiedNameThe qualified name of the document element to be
+ * 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 doctypeThe type of document to be created or <code>null</code>.
+ * @param doctype The type of document to be created or <code>null</code>.
* When <code>doctype</code> is not <code>null</code>, its
* <code>Node.ownerDocument</code> attribute is set to the document
* being created.
@@ -86,10 +87,19 @@
* <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,
1.8 +108 -45 xml-xerces/java/src/org/w3c/dom/Document.java
Index: Document.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/Document.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Document.java 15 Nov 2001 21:53:03 -0000 1.7
+++ Document.java 4 Apr 2002 15:35:09 -0000 1.8
@@ -59,10 +59,10 @@
* and attached to the element.
* <br>To create an element with a qualified name and namespace URI, use
* the <code>createElementNS</code> method.
- * @param tagNameThe name of the element type to instantiate. For XML,
+ * @param tagName The name of the element type to instantiate. For XML,
* this is case-sensitive. For HTML, the <code>tagName</code>
* parameter may be provided in any case, but it must be mapped to the
- * canonical uppercase form by the DOM implementation.
+ * canonical uppercase form by the DOM implementation.
* @return A new <code>Element</code> object with the
* <code>nodeName</code> attribute set to <code>tagName</code>, and
* <code>localName</code>, <code>prefix</code>, and
@@ -75,21 +75,21 @@
throws DOMException;
/**
- * Creates an empty <code>DocumentFragment</code> object.
+ * Creates an empty <code>DocumentFragment</code> object.
* @return A new <code>DocumentFragment</code>.
*/
public DocumentFragment createDocumentFragment();
/**
* Creates a <code>Text</code> node given the specified string.
- * @param dataThe data for the node.
+ * @param data The data for the node.
* @return The new <code>Text</code> object.
*/
public Text createTextNode(String data);
/**
* Creates a <code>Comment</code> node given the specified string.
- * @param dataThe data for the node.
+ * @param data The data for the node.
* @return The new <code>Comment</code> object.
*/
public Comment createComment(String data);
@@ -97,7 +97,7 @@
/**
* Creates a <code>CDATASection</code> node whose value is the specified
* string.
- * @param dataThe data for the <code>CDATASection</code> contents.
+ * @param data The data for the <code>CDATASection</code> contents.
* @return The new <code>CDATASection</code> object.
* @exception DOMException
* NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
@@ -108,8 +108,8 @@
/**
* Creates a <code>ProcessingInstruction</code> node given the specified
* name and data strings.
- * @param targetThe target part of the processing instruction.
- * @param dataThe data for the node.
+ * @param target The target part of the processing instruction.
+ * @param data The data for the node.
* @return The new <code>ProcessingInstruction</code> object.
* @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified target contains an
@@ -126,7 +126,7 @@
* using the <code>setAttributeNode</code> method.
* <br>To create an attribute with a qualified name and namespace URI, use
* the <code>createAttributeNS</code> method.
- * @param nameThe name of the attribute.
+ * @param name The name of the attribute.
* @return A new <code>Attr</code> object with the <code>nodeName</code>
* attribute set to <code>name</code>, and <code>localName</code>,
* <code>prefix</code>, and <code>namespaceURI</code> set to
@@ -148,7 +148,7 @@
* node is also unbound; (its <code>namespaceURI</code> is
* <code>null</code>). The DOM Level 2 does not support any mechanism to
* resolve namespace prefixes.
- * @param nameThe name of the entity to reference.
+ * @param name The name of the entity to reference.
* @return The new <code>EntityReference</code> object.
* @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified name contains an
@@ -161,8 +161,8 @@
/**
* Returns a <code>NodeList</code> of all the <code>Elements</code> with a
* given tag name in the order in which they are encountered in a
- * preorder traversal of the <code>Document</code> tree.
- * @param tagnameThe name of the tag to match on. The special value "*"
+ * preorder traversal of the <code>Document</code> tree.
+ * @param tagname The name of the tag to match on. The special value "*"
* matches all tags.
* @return A new <code>NodeList</code> object containing all the matched
* <code>Elements</code>.
@@ -255,9 +255,9 @@
* 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>
- *
- * @param importedNodeThe node to import.
- * @param deepIf <code>true</code>, recursively import the subtree under
+ * </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
* itself, as explained above. This has no effect on <code>Attr</code>
* , <code>EntityReference</code>, and <code>Notation</code> nodes.
@@ -272,28 +272,57 @@
throws DOMException;
/**
- * Creates an element of the given qualified name and namespace URI.
- * HTML-only DOM implementations do not need to implement this method.
- * @param namespaceURIThe namespace URI of the element to create.
- * @param qualifiedNameThe qualified name of the element type to
+ * Creates an element of the given qualified name and namespace URI.
+ * @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,
@@ -301,31 +330,65 @@
throws DOMException;
/**
- * Creates an attribute of the given qualified name and namespace URI.
- * HTML-only DOM implementations do not need to implement this method.
- * @param namespaceURIThe namespace URI of the attribute to create.
- * @param qualifiedNameThe qualified name of the attribute to instantiate.
+ * Creates an attribute of the given qualified name and namespace URI.
+ * @param namespaceURI The namespace URI of the attribute to create.
+ * @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,
@@ -336,9 +399,9 @@
* Returns a <code>NodeList</code> of all the <code>Elements</code> with a
* given local name and namespace URI in the order in which they are
* encountered in a preorder traversal of the <code>Document</code> tree.
- * @param namespaceURIThe namespace URI of the elements to match on. The
+ * @param namespaceURI The namespace URI of the elements to match on. The
* special value "*" matches all namespaces.
- * @param localNameThe local name of the elements to match on. The
+ * @param localName The local name of the elements to match on. The
* special value "*" matches all local names.
* @return A new <code>NodeList</code> object containing all the matched
* <code>Elements</code>.
@@ -355,8 +418,8 @@
* information that says which attributes are of type ID. Attributes
* with the name "ID" are not of type ID unless so defined.
* Implementations that do not know whether attributes are of type ID or
- * not are expected to return <code>null</code>.
- * @param elementIdThe unique <code>id</code> value for an element.
+ * not are expected to return <code>null</code>.
+ * @param elementId The unique <code>id</code> value for an element.
* @return The matching element.
* @since DOM Level 2
*/
1.6 +5 -4 xml-xerces/java/src/org/w3c/dom/DocumentType.java
Index: DocumentType.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/DocumentType.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- DocumentType.java 13 Nov 2000 18:15:14 -0000 1.5
+++ DocumentType.java 4 Apr 2002 15:35:09 -0000 1.6
@@ -68,10 +68,11 @@
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();
1.9 +57 -37 xml-xerces/java/src/org/w3c/dom/Element.java
Index: Element.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/Element.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Element.java 13 Nov 2000 18:15:14 -0000 1.8
+++ Element.java 4 Apr 2002 15:35:09 -0000 1.9
@@ -39,13 +39,13 @@
* case-preserving in XML, as are all of the operations of the DOM. The
* HTML DOM returns the <code>tagName</code> of an HTML element in the
* canonical uppercase form, regardless of the case in the source HTML
- * document.
+ * document.
*/
public String getTagName();
/**
* Retrieves an attribute value by name.
- * @param nameThe name of the attribute to retrieve.
+ * @param name The name of the attribute to retrieve.
* @return The <code>Attr</code> value as a string, or the empty string
* if that attribute does not have a specified or default value.
*/
@@ -65,8 +65,8 @@
* it as the value of an attribute.
* <br>To set an attribute with a qualified name and namespace URI, use
* the <code>setAttributeNS</code> method.
- * @param nameThe name of the attribute to create or alter.
- * @param valueValue to set in string form.
+ * @param name The name of the attribute to create or alter.
+ * @param value Value to set in string form.
* @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified name contains an
* illegal character.
@@ -83,7 +83,7 @@
* and prefix when applicable.
* <br>To remove an attribute by local name and namespace URI, use the
* <code>removeAttributeNS</code> method.
- * @param nameThe name of the attribute to remove.
+ * @param name The name of the attribute to remove.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
@@ -94,7 +94,7 @@
* Retrieves an attribute node by name.
* <br>To retrieve an attribute node by qualified name and namespace URI,
* use the <code>getAttributeNodeNS</code> method.
- * @param nameThe name (<code>nodeName</code>) of the attribute to
+ * @param name The name (<code>nodeName</code>) of the attribute to
* retrieve.
* @return The <code>Attr</code> node with the specified name (
* <code>nodeName</code>) or <code>null</code> if there is no such
@@ -108,7 +108,7 @@
* replaced by the new one.
* <br>To add a new attribute node with a qualified name and namespace
* URI, use the <code>setAttributeNodeNS</code> method.
- * @param newAttrThe <code>Attr</code> node to add to the attribute list.
+ * @param newAttr The <code>Attr</code> node to add to the attribute list.
* @return If the <code>newAttr</code> attribute replaces an existing
* attribute, the replaced <code>Attr</code> node is returned,
* otherwise <code>null</code> is returned.
@@ -129,7 +129,7 @@
* 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, when applicable.
- * @param oldAttrThe <code>Attr</code> node to remove from the attribute
+ * @param oldAttr The <code>Attr</code> node to remove from the attribute
* list.
* @return The <code>Attr</code> node that was removed.
* @exception DOMException
@@ -144,17 +144,20 @@
* Returns a <code>NodeList</code> of all descendant <code>Elements</code>
* with a given tag name, in the order in which they are encountered in
* a preorder traversal of this <code>Element</code> tree.
- * @param nameThe name of the tag to match on. The special value "*"
+ * @param name The name of the tag to match on. The special value "*"
* matches all tags.
* @return A list of matching <code>Element</code> nodes.
*/
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.
- * @param namespaceURIThe namespace URI of the attribute to retrieve.
- * @param localNameThe local name of the attribute to retrieve.
+ * 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
* if that attribute does not have a specified or default value.
* @since DOM Level 2
@@ -177,25 +180,28 @@
* 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 namespaceURIThe namespace URI of the attribute to create or
+ * @param namespaceURI The namespace URI of the attribute to create or
* alter.
- * @param qualifiedNameThe qualified name of the attribute to create or
+ * @param qualifiedName The qualified name of the attribute to create or
* alter.
- * @param valueThe value to set in string form.
+ * @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,9 +214,12 @@
* 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.
- * @param namespaceURIThe namespace URI of the attribute to remove.
- * @param localNameThe local name of the attribute to remove.
+ * <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
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
* @since DOM Level 2
@@ -220,10 +229,13 @@
throws DOMException;
/**
- * Retrieves an <code>Attr</code> node by local name and namespace URI.
- * HTML-only DOM implementations do not need to implement this method.
- * @param namespaceURIThe namespace URI of the attribute to retrieve.
- * @param localNameThe local name of the attribute to retrieve.
+ * Retrieves an <code>Attr</code> node 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> node with the specified attribute local
* name and namespace URI or <code>null</code> if there is no such
* attribute.
@@ -236,8 +248,7 @@
* 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 newAttrThe <code>Attr</code> node to add to the attribute list.
+ * @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
* <code>Attr</code> node is returned, otherwise <code>null</code> is
@@ -250,6 +261,9 @@
* 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,10 +274,13 @@
* <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.
- * @param namespaceURIThe namespace URI of the elements to match on. The
+ * <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 localNameThe local name of the elements to match on. The
+ * @param localName The local name of the elements to match on. The
* special value "*" matches all local names.
* @return A new <code>NodeList</code> object containing all the matched
* <code>Elements</code>.
@@ -276,7 +293,7 @@
* Returns <code>true</code> when an attribute with a given name is
* specified on this element or has a default value, <code>false</code>
* otherwise.
- * @param nameThe name of the attribute to look for.
+ * @param name The name of the attribute to look for.
* @return <code>true</code> if an attribute with the given name is
* specified on this element or has a default value, <code>false</code>
* otherwise.
@@ -287,10 +304,13 @@
/**
* 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.
- * @param namespaceURIThe namespace URI of the attribute to look for.
- * @param localNameThe local name of the attribute to look for.
+ * <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
* and namespace URI is specified or has a default value on this
* element, <code>false</code> otherwise.
1.8 +1 -1 xml-xerces/java/src/org/w3c/dom/Entity.java
Index: Entity.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/Entity.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Entity.java 15 Nov 2001 21:53:03 -0000 1.7
+++ Entity.java 4 Apr 2002 15:35:09 -0000 1.8
@@ -61,7 +61,7 @@
/**
* For unparsed entities, the name of the notation for the entity. For
- * parsed entities, this is <code>null</code>.
+ * parsed entities, this is <code>null</code>.
*/
public String getNotationName();
1.6 +32 -14 xml-xerces/java/src/org/w3c/dom/NamedNodeMap.java
Index: NamedNodeMap.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/NamedNodeMap.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- NamedNodeMap.java 13 Nov 2000 18:15:15 -0000 1.5
+++ NamedNodeMap.java 4 Apr 2002 15:35:09 -0000 1.6
@@ -27,7 +27,7 @@
public interface NamedNodeMap {
/**
* Retrieves a node specified by name.
- * @param nameThe <code>nodeName</code> of a node to retrieve.
+ * @param name The <code>nodeName</code> of a node to retrieve.
* @return A <code>Node</code> (of any type) with the specified
* <code>nodeName</code>, or <code>null</code> if it does not identify
* any node in this map.
@@ -43,7 +43,7 @@
* (those that have a "special" string value) cannot be stored as the
* names would clash. This is seen as preferable to allowing nodes to be
* aliased.
- * @param argA node to store in this map. The node will later be
+ * @param arg A node to store in this map. The node will later be
* accessible using the value of its <code>nodeName</code> attribute.
* @return If the new <code>Node</code> replaces an existing node the
* replaced <code>Node</code> is returned, otherwise <code>null</code>
@@ -56,6 +56,11 @@
* <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;
@@ -66,7 +71,7 @@
* default value, an attribute immediately appears containing the
* default value as well as the corresponding namespace URI, local name,
* and prefix when applicable.
- * @param nameThe <code>nodeName</code> of the node to remove.
+ * @param name The <code>nodeName</code> of the node to remove.
* @return The node removed from this map if a node with such a name
* exists.
* @exception DOMException
@@ -81,7 +86,7 @@
* Returns the <code>index</code>th item in the map. If <code>index</code>
* is greater than or equal to the number of nodes in this map, this
* returns <code>null</code>.
- * @param indexIndex into this map.
+ * @param index Index into this map.
* @return The node at the <code>index</code>th position in the map, or
* <code>null</code> if that is not a valid index.
*/
@@ -89,15 +94,18 @@
/**
* The number of nodes in this map. The range of valid child node indices
- * is <code>0</code> to <code>length-1</code> inclusive.
+ * is <code>0</code> to <code>length-1</code> inclusive.
*/
public int getLength();
/**
- * Retrieves a node specified by local name and namespace URI. HTML-only
- * DOM implementations do not need to implement this method.
- * @param namespaceURIThe namespace URI of the node to retrieve.
- * @param localNameThe local name of the node to retrieve.
+ * 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
* name and namespace URI, or <code>null</code> if they do not
* identify any node in this map.
@@ -111,8 +119,7 @@
* <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 argA node to store in this map. The node will later be
+ * @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.
* @return If the new <code>Node</code> replaces an existing node the
@@ -126,6 +133,14 @@
* <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,9 +153,12 @@
* 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.
- * @param namespaceURIThe namespace URI of the node to remove.
- * @param localNameThe local name of the node to remove.
+ * <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
* name and namespace URI exists.
* @exception DOMException
1.8 +98 -76 xml-xerces/java/src/org/w3c/dom/Node.java
Index: Node.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/Node.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Node.java 14 Feb 2002 11:48:05 -0000 1.7
+++ Node.java 4 Apr 2002 15:35:09 -0000 1.8
@@ -28,114 +28,98 @@
* <code>Element</code> or <code>attributes</code> for a <code>Comment</code>
* ), this returns <code>null</code>. Note that the specialized interfaces
* may contain additional and more convenient mechanisms to get and set the
- * relevant information.<br><br>
- *
- * The values of <code>nodeName, nodeValue,</code> and <code>attributes</code>
- * vary according to the node type as follows:<br>
- *
- * <table border='1'
- * summary='Layout table: the first cell contains the name of the interface,
- * the second contains the value of the nodeName attribute for this interface,
- * the third contains the value of the nodeValue attribute for this interface and
- * the fourth contains the value of the attributes attribute for this interface'>
+ * 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'>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'>#cdata-section</td>
- * <td valign='top' rowspan='1' colspan='1'>content of the CDATA
- * Section</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'>#comment</td>
- * <td valign='top' rowspan='1' colspan='1'>content of the
- * 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'>#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'>#document-fragment</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>
* <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'>
+ * 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>
+ * <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'>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'>#text</td>
- * <td valign='top' rowspan='1' colspan='1'>content of the text
- * node</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>
- *
- *
+ * </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 {
@@ -190,14 +174,15 @@
public static final short NOTATION_NODE = 12;
/**
- * The name of this node, depending on its type; see the table above.
+ * The name of this node, depending on its type; see the table above.
*/
public String getNodeName();
/**
- * Returns the value of this node, depending on its type; see the table above.
+ * 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
@@ -205,13 +190,15 @@
*/
public String getNodeValue()
throws DOMException;
-
/**
- * Sets the value of this node, depending on its type; see the table above.
+ * 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;
@@ -264,7 +251,7 @@
/**
* A <code>NamedNodeMap</code> containing the attributes of this node (if
- * it is an <code>Element</code>) or <code>null</code> otherwise.
+ * it is an <code>Element</code>) or <code>null</code> otherwise.
*/
public NamedNodeMap getAttributes();
@@ -286,14 +273,15 @@
* all of its children are inserted, in the same order, before
* <code>refChild</code>. If the <code>newChild</code> is already in the
* tree, it is first removed.
- * @param newChildThe node to insert.
- * @param refChildThe reference node, i.e., the node before which the new
- * node must be inserted.
+ * @param newChild The node to insert.
+ * @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
@@ -313,13 +301,14 @@
* <code>DocumentFragment</code> children, which are inserted in the
* same order. If the <code>newChild</code> is already in the tree, it
* is first removed.
- * @param newChildThe new node to put in the child list.
- * @param oldChildThe node being replaced in the list.
+ * @param newChild The new node to put in the child list.
+ * @param oldChild The node being replaced in the list.
* @return The node replaced.
* @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
@@ -334,7 +323,7 @@
/**
* Removes the child node indicated by <code>oldChild</code> from the list
* of children, and returns it.
- * @param oldChildThe node being removed.
+ * @param oldChild The node being removed.
* @return The node removed.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
@@ -348,24 +337,26 @@
* 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;
/**
* Returns whether this node has any children.
- * @return <code>true</code> if this node has any children,
+ * @return <code>true</code> if this node has any children,
* <code>false</code> otherwise.
*/
public boolean hasChildNodes();
@@ -389,9 +380,9 @@
* specified. And, cloning <code>Document</code>,
* <code>DocumentType</code>, <code>Entity</code>, and
* <code>Notation</code> nodes is implementation dependent.
- * @param deepIf <code>true</code>, recursively clone the subtree under
+ * @param deep If <code>true</code>, recursively clone the subtree under
* the specified node; if <code>false</code>, clone only the node
- * itself (and its attributes, if it is an <code>Element</code>).
+ * itself (and its attributes, if it is an <code>Element</code>).
* @return The duplicate node.
*/
public Node cloneNode(boolean deep);
@@ -417,10 +408,10 @@
/**
* Tests whether the DOM implementation implements a specific feature and
* that feature is supported by this node.
- * @param featureThe name of the feature to test. This is the same name
+ * @param feature The name of the feature to test. This is the same name
* which can be passed to the method <code>hasFeature</code> on
* <code>DOMImplementation</code>.
- * @param versionThis is the version number of the feature to test. In
+ * @param version This is the version number of the feature to test. In
* Level 2, version 1, this is the string "2.0". If the version is not
* specified, supporting any version of the feature will cause the
* method to return <code>true</code>.
@@ -466,20 +457,51 @@
* <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;
1.6 +2 -2 xml-xerces/java/src/org/w3c/dom/NodeList.java
Index: NodeList.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/NodeList.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- NodeList.java 13 Nov 2000 18:15:15 -0000 1.5
+++ NodeList.java 4 Apr 2002 15:35:09 -0000 1.6
@@ -25,7 +25,7 @@
* Returns the <code>index</code>th item in the collection. If
* <code>index</code> is greater than or equal to the number of nodes in
* the list, this returns <code>null</code>.
- * @param indexIndex into the collection.
+ * @param index Index into the collection.
* @return The node at the <code>index</code>th position in the
* <code>NodeList</code>, or <code>null</code> if that is not a valid
* index.
@@ -34,7 +34,7 @@
/**
* The number of nodes in the list. The range of valid child node indices
- * is 0 to <code>length-1</code> inclusive.
+ * is 0 to <code>length-1</code> inclusive.
*/
public int getLength();
1.6 +7 -0 xml-xerces/java/src/org/w3c/dom/ProcessingInstruction.java
Index: ProcessingInstruction.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ProcessingInstruction.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ProcessingInstruction.java 13 Nov 2000 18:15:15 -0000 1.5
+++ ProcessingInstruction.java 4 Apr 2002 15:35:09 -0000 1.6
@@ -34,6 +34,13 @@
* 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;
1.6 +1 -1 xml-xerces/java/src/org/w3c/dom/Text.java
Index: Text.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/Text.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Text.java 13 Nov 2000 18:15:15 -0000 1.5
+++ Text.java 4 Apr 2002 15:35:09 -0000 1.6
@@ -42,7 +42,7 @@
* node had a parent node, the new node is inserted as the next sibling
* of the original node. When the <code>offset</code> is equal to the
* length of this node, the new node has no data.
- * @param offsetThe 16-bit unit offset at which to split, starting from
+ * @param offset The 16-bit unit offset at which to split, starting from
* <code>0</code>.
* @return The new node, of the same type as this node.
* @exception DOMException
1.5 +1 -1 xml-xerces/java/src/org/w3c/dom/events/DocumentEvent.java
Index: DocumentEvent.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/events/DocumentEvent.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DocumentEvent.java 13 Nov 2000 18:16:20 -0000 1.4
+++ DocumentEvent.java 4 Apr 2002 15:35:10 -0000 1.5
@@ -26,7 +26,7 @@
public interface DocumentEvent {
/**
*
- * @param eventTypeThe <code>eventType</code> parameter specifies the
+ * @param eventType The <code>eventType</code> parameter specifies the
* type of <code>Event</code> interface to be created. If the
* <code>Event</code> interface specified is supported by the
* implementation this method will return a new <code>Event</code> of
1.5 +3 -3 xml-xerces/java/src/org/w3c/dom/events/Event.java
Index: Event.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/events/Event.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Event.java 13 Nov 2000 18:16:20 -0000 1.4
+++ Event.java 4 Apr 2002 15:35:10 -0000 1.5
@@ -122,7 +122,7 @@
* <code>Event</code> interface only the values specified in the
* <code>initEvent</code> method are modified, all other attributes are
* left unchanged.
- * @param eventTypeArgSpecifies the event type. This type may be any
+ * @param eventTypeArg Specifies the event type. This type may be any
* event type currently defined in this specification or a new event
* type.. The string must be an XML name. Any new event type must not
* begin with any upper, lower, or mixed case version of the string
@@ -130,8 +130,8 @@
* also strongly recommended that third parties adding their own
* events use their own prefix to avoid confusion and lessen the
* probability of conflicts with other new events.
- * @param canBubbleArgSpecifies whether or not the event can bubble.
- * @param cancelableArgSpecifies whether or not the event's default
+ * @param canBubbleArg Specifies whether or not the event can bubble.
+ * @param cancelableArg Specifies whether or not the event's default
* action can be prevented.
*/
public void initEvent(String eventTypeArg,
1.5 +1 -1 xml-xerces/java/src/org/w3c/dom/events/EventListener.java
Index: EventListener.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/events/EventListener.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- EventListener.java 13 Nov 2000 18:16:20 -0000 1.4
+++ EventListener.java 4 Apr 2002 15:35:10 -0000 1.5
@@ -31,7 +31,7 @@
/**
* This method is called whenever an event occurs of the type for which
* the <code> EventListener</code> interface was registered.
- * @param evt The <code>Event</code> contains contextual information
+ * @param evt The <code>Event</code> contains contextual information
* about the event. It also contains the <code>stopPropagation</code>
* and <code>preventDefault</code> methods which are used in
* determining the event's flow and default action.
1.5 +7 -7 xml-xerces/java/src/org/w3c/dom/events/EventTarget.java
Index: EventTarget.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/events/EventTarget.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- EventTarget.java 13 Nov 2000 18:16:20 -0000 1.4
+++ EventTarget.java 4 Apr 2002 15:35:10 -0000 1.5
@@ -36,11 +36,11 @@
* <code>EventListener</code> to be called twice and since they are
* discarded they do not need to be removed with the
* <code>removeEventListener</code> method.
- * @param typeThe event type for which the user is registering
- * @param listenerThe <code>listener</code> parameter takes an interface
+ * @param type The event type for which the user is registering
+ * @param listener The <code>listener</code> parameter takes an interface
* implemented by the user which contains the methods to be called
* when the event occurs.
- * @param useCaptureIf true, <code>useCapture</code> indicates that the
+ * @param useCapture If true, <code>useCapture</code> indicates that the
* user wishes to initiate capture. After initiating capture, all
* events of the specified type will be dispatched to the registered
* <code>EventListener</code> before being dispatched to any
@@ -61,11 +61,11 @@
* <br>Calling <code>removeEventListener</code> with arguments which do
* not identify any currently registered <code>EventListener</code> on
* the <code>EventTarget</code> has no effect.
- * @param typeSpecifies the event type of the <code>EventListener</code>
+ * @param type Specifies the event type of the <code>EventListener</code>
* being removed.
- * @param listenerThe <code>EventListener</code> parameter indicates the
+ * @param listener The <code>EventListener</code> parameter indicates the
* <code>EventListener </code> to be removed.
- * @param useCaptureSpecifies whether the <code>EventListener</code>
+ * @param useCapture Specifies whether the <code>EventListener</code>
* being removed was registered as a capturing listener or not. If a
* listener was registered twice, one with capture and one without,
* each must be removed separately. Removal of a capturing listener
@@ -83,7 +83,7 @@
* implementation. The target of the event is the
* <code> EventTarget</code> on which <code>dispatchEvent</code> is
* called.
- * @param evtSpecifies the event type, behavior, and contextual
+ * @param evt Specifies the event type, behavior, and contextual
* information to be used in processing the event.
* @return The return value of <code>dispatchEvent</code> indicates
* whether any of the listeners which handled the event called
1.5 +8 -8 xml-xerces/java/src/org/w3c/dom/events/MutationEvent.java
Index: MutationEvent.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/events/MutationEvent.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- MutationEvent.java 13 Nov 2000 18:16:20 -0000 1.4
+++ MutationEvent.java 4 Apr 2002 15:35:10 -0000 1.5
@@ -82,18 +82,18 @@
* <code>dispatchEvent</code> method, though it may be called multiple
* times during that phase if necessary. If called multiple times, the
* final invocation takes precedence.
- * @param typeArgSpecifies the event type.
- * @param canBubbleArgSpecifies whether or not the event can bubble.
- * @param cancelableArgSpecifies whether or not the event's default
+ * @param typeArg Specifies the event type.
+ * @param canBubbleArg Specifies whether or not the event can bubble.
+ * @param cancelableArg Specifies whether or not the event's default
* action can be prevented.
- * @param relatedNodeArgSpecifies the <code>Event</code>'s related Node.
- * @param prevValueArgSpecifies the <code>Event</code>'s
+ * @param relatedNodeArg Specifies the <code>Event</code>'s related Node.
+ * @param prevValueArg Specifies the <code>Event</code>'s
* <code>prevValue</code> attribute. This value may be null.
- * @param newValueArgSpecifies the <code>Event</code>'s
+ * @param newValueArg Specifies the <code>Event</code>'s
* <code>newValue</code> attribute. This value may be null.
- * @param attrNameArgSpecifies the <code>Event</code>'s
+ * @param attrNameArg Specifies the <code>Event</code>'s
* <code>attrName</code> attribute. This value may be null.
- * @param attrChangeArgSpecifies the <code>Event</code>'s
+ * @param attrChangeArg Specifies the <code>Event</code>'s
* <code>attrChange</code> attribute
*/
public void initMutationEvent(String typeArg,
1.2 +33 -16 xml-xerces/java/src/org/w3c/dom/ranges/Range.java
Index: Range.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ranges/Range.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Range.java 17 Nov 2000 15:38:11 -0000 1.1
+++ Range.java 4 Apr 2002 15:35:10 -0000 1.2
@@ -13,8 +13,8 @@
package org.w3c.dom.ranges;
import org.w3c.dom.Node;
-import org.w3c.dom.DocumentFragment;
import org.w3c.dom.DOMException;
+import org.w3c.dom.DocumentFragment;
/**
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
@@ -78,9 +78,9 @@
/**
* Sets the attributes describing the start of the Range.
- * @param refNodeThe <code>refNode</code> value. This parameter must be
+ * @param refNode The <code>refNode</code> value. This parameter must be
* different from <code>null</code>.
- * @param offsetThe <code>startOffset</code> value.
+ * @param offset The <code>startOffset</code> value.
* @exception RangeException
* INVALID_NODE_TYPE_ERR: Raised if <code>refNode</code> or an ancestor
* of <code>refNode</code> is an Entity, Notation, or DocumentType
@@ -93,6 +93,8 @@
* node. Child units are Nodes in all other cases.
* <br>INVALID_STATE_ERR: Raised if <code>detach()</code> has already
* been invoked on this object.
+ * <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created
+ * from a different document than the one that created this range.
*/
public void setStart(Node refNode,
int offset)
@@ -100,9 +102,9 @@
/**
* Sets the attributes describing the end of a Range.
- * @param refNodeThe <code>refNode</code> value. This parameter must be
+ * @param refNode The <code>refNode</code> value. This parameter must be
* different from <code>null</code>.
- * @param offsetThe <code>endOffset</code> value.
+ * @param offset The <code>endOffset</code> value.
* @exception RangeException
* INVALID_NODE_TYPE_ERR: Raised if <code>refNode</code> or an ancestor
* of <code>refNode</code> is an Entity, Notation, or DocumentType
@@ -115,6 +117,8 @@
* node. Child units are Nodes in all other cases.
* <br>INVALID_STATE_ERR: Raised if <code>detach()</code> has already
* been invoked on this object.
+ * <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created
+ * from a different document than the one that created this range.
*/
public void setEnd(Node refNode,
int offset)
@@ -122,7 +126,7 @@
/**
* Sets the start position to be before a node
- * @param refNodeRange starts before <code>refNode</code>
+ * @param refNode Range starts before <code>refNode</code>
* @exception RangeException
* INVALID_NODE_TYPE_ERR: Raised if the root container of
* <code>refNode</code> is not an Attr, Document, or DocumentFragment
@@ -131,13 +135,15 @@
* @exception DOMException
* INVALID_STATE_ERR: Raised if <code>detach()</code> has already been
* invoked on this object.
+ * <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created
+ * from a different document than the one that created this range.
*/
public void setStartBefore(Node refNode)
throws RangeException, DOMException;
/**
* Sets the start position to be after a node
- * @param refNodeRange starts after <code>refNode</code>
+ * @param refNode Range starts after <code>refNode</code>
* @exception RangeException
* INVALID_NODE_TYPE_ERR: Raised if the root container of
* <code>refNode</code> is not an Attr, Document, or DocumentFragment
@@ -146,13 +152,15 @@
* @exception DOMException
* INVALID_STATE_ERR: Raised if <code>detach()</code> has already been
* invoked on this object.
+ * <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created
+ * from a different document than the one that created this range.
*/
public void setStartAfter(Node refNode)
throws RangeException, DOMException;
/**
* Sets the end position to be before a node.
- * @param refNodeRange ends before <code>refNode</code>
+ * @param refNode Range ends before <code>refNode</code>
* @exception RangeException
* INVALID_NODE_TYPE_ERR: Raised if the root container of
* <code>refNode</code> is not an Attr, Document, or DocumentFragment
@@ -161,13 +169,15 @@
* @exception DOMException
* INVALID_STATE_ERR: Raised if <code>detach()</code> has already been
* invoked on this object.
+ * <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created
+ * from a different document than the one that created this range.
*/
public void setEndBefore(Node refNode)
throws RangeException, DOMException;
/**
* Sets the end of a Range to be after a node
- * @param refNodeRange ends after <code>refNode</code>.
+ * @param refNode Range ends after <code>refNode</code>.
* @exception RangeException
* INVALID_NODE_TYPE_ERR: Raised if the root container of
* <code>refNode</code> is not an Attr, Document or DocumentFragment
@@ -176,13 +186,15 @@
* @exception DOMException
* INVALID_STATE_ERR: Raised if <code>detach()</code> has already been
* invoked on this object.
+ * <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created
+ * from a different document than the one that created this range.
*/
public void setEndAfter(Node refNode)
throws RangeException, DOMException;
/**
* Collapse a Range onto one of its boundary-points
- * @param toStartIf TRUE, collapses the Range onto its start; if FALSE,
+ * @param toStart If TRUE, collapses the Range onto its start; if FALSE,
* collapses it onto its end.
* @exception DOMException
* INVALID_STATE_ERR: Raised if <code>detach()</code> has already been
@@ -193,7 +205,7 @@
/**
* Select a node and its contents
- * @param refNodeThe node to select.
+ * @param refNode The node to select.
* @exception RangeException
* INVALID_NODE_TYPE_ERR: Raised if an ancestor of <code>refNode</code>
* is an Entity, Notation or DocumentType node or if
@@ -202,19 +214,23 @@
* @exception DOMException
* INVALID_STATE_ERR: Raised if <code>detach()</code> has already been
* invoked on this object.
+ * <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created
+ * from a different document than the one that created this range.
*/
public void selectNode(Node refNode)
throws RangeException, DOMException;
/**
* Select the contents within a node
- * @param refNodeNode to select from
+ * @param refNode Node to select from
* @exception RangeException
* INVALID_NODE_TYPE_ERR: Raised if <code>refNode</code> or an ancestor
* of <code>refNode</code> is an Entity, Notation or DocumentType node.
* @exception DOMException
* INVALID_STATE_ERR: Raised if <code>detach()</code> has already been
* invoked on this object.
+ * <br>WRONG_DOCUMENT_ERR: Raised if <code>refNode</code> was created
+ * from a different document than the one that created this range.
*/
public void selectNodeContents(Node refNode)
throws RangeException, DOMException;
@@ -247,8 +263,9 @@
/**
* Compare the boundary-points of two Ranges in a document.
- * @param howA code representing the type of comparison, as defined above.
- * @param sourceRangeThe <code>Range</code> on which this current
+ * @param how A code representing the type of comparison, as defined
+ * above.
+ * @param sourceRange The <code>Range</code> on which this current
* <code>Range</code> is compared to.
* @return -1, 0 or 1 depending on whether the corresponding
* boundary-point of the Range is respectively before, equal to, or
@@ -315,7 +332,7 @@
* automatically merged. If the node to be inserted is a
* DocumentFragment node, the children will be inserted rather than the
* DocumentFragment node itself.
- * @param newNodeThe node to insert at the start of the Range
+ * @param newNode The node to insert at the start of the Range
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if an ancestor container of the
* start of the Range is read-only.
@@ -338,7 +355,7 @@
/**
* Reparents the contents of the Range to the given node and inserts the
* node at the position of the start of the Range.
- * @param newParentThe node to surround the contents with.
+ * @param newParent The node to surround the contents with.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if an ancestor container of
* either boundary-point of the Range is read-only.
1.5 +27 -25 xml-xerces/java/src/org/w3c/dom/traversal/DocumentTraversal.java
Index: DocumentTraversal.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/traversal/DocumentTraversal.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DocumentTraversal.java 13 Nov 2000 18:16:20 -0000 1.4
+++ DocumentTraversal.java 4 Apr 2002 15:35:10 -0000 1.5
@@ -16,12 +16,13 @@
import org.w3c.dom.DOMException;
/**
- * <code>DocumentTraversal</code> contains methods that create iterators and
- * tree-walkers to traverse a node and its children in document order (depth
- * first, pre-order traversal, which is equivalent to the order in which the
- * start tags occur in the text representation of the document). In DOMs
- * which support the Traversal feature, <code>DocumentTraversal</code> will
- * be implemented by the same objects that implement the Document interface.
+ * <code>DocumentTraversal</code> contains methods that create
+ * <code>NodeIterators</code> and <code>TreeWalkers</code> to traverse a
+ * node and its children in document order (depth first, pre-order
+ * traversal, which is equivalent to the order in which the start tags occur
+ * in the text representation of the document). In DOMs which support the
+ * Traversal feature, <code>DocumentTraversal</code> will be implemented by
+ * the same objects that implement the Document interface.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
* @since DOM Level 2
*/
@@ -29,19 +30,19 @@
/**
* Create a new <code>NodeIterator</code> over the subtree rooted at the
* specified node.
- * @param rootThe node which will be iterated together with its children.
- * The iterator is initially positioned just before this node. The
- * <code>whatToShow</code> flags and the filter, if any, are not
- * considered when setting this position. The root must not be
- * <code>null</code>.
- * @param whatToShowThis flag specifies which node types may appear in
- * the logical view of the tree presented by the iterator. See the
- * description of <code>NodeFilter</code> for the set of possible
- * <code>SHOW_</code> values.These flags can be combined using
- * <code>OR</code>.
- * @param filterThe <code>NodeFilter</code> to be used with this
+ * @param root The node which will be iterated together with its
+ * children. The <code>NodeIterator</code> is initially positioned
+ * just before this node. The <code>whatToShow</code> flags and the
+ * filter, if any, are not considered when setting this position. The
+ * root must not be <code>null</code>.
+ * @param whatToShow This flag specifies which node types may appear in
+ * the logical view of the tree presented by the
+ * <code>NodeIterator</code>. See the description of
+ * <code>NodeFilter</code> for the set of possible <code>SHOW_</code>
+ * values.These flags can be combined using <code>OR</code>.
+ * @param filter The <code>NodeFilter</code> to be used with this
* <code>TreeWalker</code>, or <code>null</code> to indicate no filter.
- * @param entityReferenceExpansionThe value of this flag determines
+ * @param entityReferenceExpansion The value of this flag determines
* whether entity reference nodes are expanded.
* @return The newly created <code>NodeIterator</code>.
* @exception DOMException
@@ -57,7 +58,7 @@
/**
* Create a new <code>TreeWalker</code> over the subtree rooted at the
* specified node.
- * @param rootThe node which will serve as the <code>root</code> for the
+ * @param root The node which will serve as the <code>root</code> for the
* <code>TreeWalker</code>. The <code>whatToShow</code> flags and the
* <code>NodeFilter</code> are not considered when setting this value;
* any node type will be accepted as the <code>root</code>. The
@@ -67,13 +68,14 @@
* methods that look upward in the document structure, such as
* <code>parentNode</code> and nextNode. The <code>root</code> must
* not be <code>null</code>.
- * @param whatToShowThis flag specifies which node types may appear in
- * the logical view of the tree presented by the tree-walker. See the
- * description of <code>NodeFilter</code> for the set of possible
- * SHOW_ values.These flags can be combined using <code>OR</code>.
- * @param filterThe <code>NodeFilter</code> to be used with this
+ * @param whatToShow This flag specifies which node types may appear in
+ * the logical view of the tree presented by the
+ * <code>TreeWalker</code>. See the description of
+ * <code>NodeFilter</code> for the set of possible <code>SHOW_</code>
+ * values.These flags can be combined using <code>OR</code>.
+ * @param filter The <code>NodeFilter</code> to be used with this
* <code>TreeWalker</code>, or <code>null</code> to indicate no filter.
- * @param entityReferenceExpansionIf this flag is false, the contents of
+ * @param entityReferenceExpansion If this flag is false, the contents of
* <code>EntityReference</code> nodes are not presented in the logical
* view.
* @return The newly created <code>TreeWalker</code>.
1.5 +19 -17 xml-xerces/java/src/org/w3c/dom/traversal/NodeFilter.java
Index: NodeFilter.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/traversal/NodeFilter.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- NodeFilter.java 13 Nov 2000 18:16:20 -0000 1.4
+++ NodeFilter.java 4 Apr 2002 15:35:10 -0000 1.5
@@ -68,11 +68,11 @@
public static final int SHOW_ELEMENT = 0x00000001;
/**
* Show <code>Attr</code> nodes. This is meaningful only when creating an
- * iterator or tree-walker with an attribute node as its
- * <code>root</code>; in this case, it means that the attribute node
- * will appear in the first position of the iteration or traversal.
- * Since attributes are never children of other nodes, they do not
- * appear when traversing over the document tree.
+ * <code>NodeIterator</code> or <code>TreeWalker</code> with an
+ * attribute node as its <code>root</code>; in this case, it means that
+ * the attribute node will appear in the first position of the iteration
+ * or traversal. Since attributes are never children of other nodes,
+ * they do not appear when traversing over the document tree.
*/
public static final int SHOW_ATTRIBUTE = 0x00000002;
/**
@@ -89,11 +89,12 @@
public static final int SHOW_ENTITY_REFERENCE = 0x00000010;
/**
* Show <code>Entity</code> nodes. This is meaningful only when creating
- * an iterator or tree-walker with an<code> Entity</code> node as its
- * <code>root</code>; in this case, it means that the <code>Entity</code>
- * node will appear in the first position of the traversal. Since
- * entities are not part of the document tree, they do not appear when
- * traversing over the document tree.
+ * an <code>NodeIterator</code> or <code>TreeWalker</code> with an
+ * <code>Entity</code> node as its <code>root</code>; in this case, it
+ * means that the <code>Entity</code> node will appear in the first
+ * position of the traversal. Since entities are not part of the
+ * document tree, they do not appear when traversing over the document
+ * tree.
*/
public static final int SHOW_ENTITY = 0x00000020;
/**
@@ -118,11 +119,12 @@
public static final int SHOW_DOCUMENT_FRAGMENT = 0x00000400;
/**
* Show <code>Notation</code> nodes. This is meaningful only when creating
- * an iterator or tree-walker with a <code>Notation</code> node as its
- * <code>root</code>; in this case, it means that the
- * <code>Notation</code> node will appear in the first position of the
- * traversal. Since notations are not part of the document tree, they do
- * not appear when traversing over the document tree.
+ * an <code>NodeIterator</code> or <code>TreeWalker</code> with a
+ * <code>Notation</code> node as its <code>root</code>; in this case, it
+ * means that the <code>Notation</code> node will appear in the first
+ * position of the traversal. Since notations are not part of the
+ * document tree, they do not appear when traversing over the document
+ * tree.
*/
public static final int SHOW_NOTATION = 0x00000800;
@@ -133,8 +135,8 @@
* <code>NodeIterator</code>; it is not normally called directly from
* user code. (Though you could do so if you wanted to use the same
* filter to guide your own application logic.)
- * @param nThe node to check to see if it passes the filter or not.
- * @return a constant to determine whether the node is accepted,
+ * @param n The node to check to see if it passes the filter or not.
+ * @return A constant to determine whether the node is accepted,
* rejected, or skipped, as defined above.
*/
public short acceptNode(Node n);
1.5 +27 -26 xml-xerces/java/src/org/w3c/dom/traversal/NodeIterator.java
Index: NodeIterator.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/traversal/NodeIterator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- NodeIterator.java 13 Nov 2000 18:16:20 -0000 1.4
+++ NodeIterator.java 4 Apr 2002 15:35:10 -0000 1.5
@@ -16,15 +16,15 @@
import org.w3c.dom.DOMException;
/**
- * <code>Iterators</code> are used to step through a set of nodes, e.g. the
- * set of nodes in a <code>NodeList</code>, the document subtree governed by
- * a particular <code>Node</code>, the results of a query, or any other set
- * of nodes. The set of nodes to be iterated is determined by the
- * implementation of the <code>NodeIterator</code>. DOM Level 2 specifies a
- * single <code>NodeIterator</code> implementation for document-order
- * traversal of a document subtree. Instances of these iterators are created
- * by calling <code>DocumentTraversal</code>
- * <code>.createNodeIterator()</code>.
+ * <code>NodeIterators</code> are used to step through a set of nodes, e.g.
+ * the set of nodes in a <code>NodeList</code>, the document subtree
+ * governed by a particular <code>Node</code>, the results of a query, or
+ * any other set of nodes. The set of nodes to be iterated is determined by
+ * the implementation of the <code>NodeIterator</code>. DOM Level 2
+ * specifies a single <code>NodeIterator</code> implementation for
+ * document-order traversal of a document subtree. Instances of these
+ * <code>NodeIterators</code> are created by calling
+ * <code>DocumentTraversal</code><code>.createNodeIterator()</code>.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>Document Object Model (DOM) Level 2 Traversal and Range Specification</a>.
* @since DOM Level 2
*/
@@ -37,8 +37,8 @@
/**
* This attribute determines which node types are presented via the
- * iterator. The available set of constants is defined in the
- * <code>NodeFilter</code> interface. Nodes not accepted by
+ * <code>NodeIterator</code>. The available set of constants is defined
+ * in the <code>NodeFilter</code> interface. Nodes not accepted by
* <code>whatToShow</code> will be skipped, but their children may still
* be considered. Note that this skip takes precedence over the filter,
* if any.
@@ -52,10 +52,10 @@
/**
* The value of this flag determines whether the children of entity
- * reference nodes are visible to the iterator. If false, they and
- * their descendants will be rejected. Note that this rejection takes
- * precedence over <code>whatToShow</code> and the filter. Also note
- * that this is currently the only situation where
+ * reference nodes are visible to the <code>NodeIterator</code>. If
+ * false, these children and their descendants will be rejected. Note
+ * that this rejection takes precedence over <code>whatToShow</code> and
+ * the filter. Also note that this is currently the only situation where
* <code>NodeIterators</code> may reject a complete subtree rather than
* skipping individual nodes.
* <br>
@@ -63,18 +63,18 @@
* expanded and does not expose the entity reference node itself, use
* the <code>whatToShow</code> flags to hide the entity reference node
* and set <code>expandEntityReferences</code> to true when creating the
- * iterator. To produce a view of the document that has entity reference
- * nodes but no entity expansion, use the <code>whatToShow</code> flags
- * to show the entity reference node and set
- * <code>expandEntityReferences</code> to false.
+ * <code>NodeIterator</code>. To produce a view of the document that has
+ * entity reference nodes but no entity expansion, use the
+ * <code>whatToShow</code> flags to show the entity reference node and
+ * set <code>expandEntityReferences</code> to false.
*/
public boolean getExpandEntityReferences();
/**
* Returns the next node in the set and advances the position of the
- * iterator in the set. After a <code>NodeIterator</code> is created,
- * the first call to <code>nextNode()</code> returns the first node in
- * the set.
+ * <code>NodeIterator</code> in the set. After a
+ * <code>NodeIterator</code> is created, the first call to
+ * <code>nextNode()</code> returns the first node in the set.
* @return The next <code>Node</code> in the set being iterated over, or
* <code>null</code> if there are no more members in that set.
* @exception DOMException
@@ -98,10 +98,11 @@
/**
* Detaches the <code>NodeIterator</code> from the set which it iterated
- * over, releasing any computational resources and placing the iterator
- * in the INVALID state. After <code>detach</code> has been invoked,
- * calls to <code>nextNode</code> or <code>previousNode</code> will
- * raise the exception INVALID_STATE_ERR.
+ * over, releasing any computational resources and placing the
+ * <code>NodeIterator</code> in the INVALID state. After
+ * <code>detach</code> has been invoked, calls to <code>nextNode</code>
+ * or <code>previousNode</code> will raise the exception
+ * INVALID_STATE_ERR.
*/
public void detach();
1.5 +17 -2 xml-xerces/java/src/org/w3c/dom/traversal/TreeWalker.java
Index: TreeWalker.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/traversal/TreeWalker.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TreeWalker.java 13 Nov 2000 18:16:20 -0000 1.4
+++ TreeWalker.java 4 Apr 2002 15:35:10 -0000 1.5
@@ -58,8 +58,8 @@
/**
* The value of this flag determines whether the children of entity
* reference nodes are visible to the <code>TreeWalker</code>. If false,
- * they and their descendants will be rejected. Note that this
- * rejection takes precedence over <code>whatToShow</code> and the
+ * these children and their descendants will be rejected. Note that
+ * this rejection takes precedence over <code>whatToShow</code> and the
* filter, if any.
* <br> To produce a view of the document that has entity references
* expanded and does not expose the entity reference node itself, use
@@ -88,6 +88,21 @@
* <code>currentNode</code> to <code>null</code>.
*/
public Node getCurrentNode();
+ /**
+ * The node at which the <code>TreeWalker</code> is currently positioned.
+ * <br>Alterations to the DOM tree may cause the current node to no longer
+ * be accepted by the <code>TreeWalker</code>'s associated filter.
+ * <code>currentNode</code> may also be explicitly set to any node,
+ * whether or not it is within the subtree specified by the
+ * <code>root</code> node or would be accepted by the filter and
+ * <code>whatToShow</code> flags. Further traversal occurs relative to
+ * <code>currentNode</code> even if it is not part of the current view,
+ * by applying the filters in the requested direction; if no traversal
+ * is possible, <code>currentNode</code> is not changed.
+ * @exception DOMException
+ * NOT_SUPPORTED_ERR: Raised if an attempt is made to set
+ * <code>currentNode</code> to <code>null</code>.
+ */
public void setCurrentNode(Node currentNode)
throws DOMException;
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org