sboag 00/11/15 11:41:08
Modified: java/src/org/apache/xalan/templates ElemForEach.java
java/src/org/apache/xalan/utils UnImplNode.java
java/src/org/apache/xpath/axes AttributeWalkerOneStep.java
AxesWalker.java ChildWalkerMultiStep.java
java/src/org/w3c/dom Attr.java CDATASection.java
CharacterData.java Comment.java DOMException.java
DOMImplementation.java Document.java
DocumentFragment.java DocumentType.java
Element.java Entity.java EntityReference.java
NamedNodeMap.java Node.java NodeList.java
Notation.java ProcessingInstruction.java Text.java
java/src/org/w3c/dom/range DocumentRange.java Range.java
java/src/org/w3c/dom/traversal DocumentTraversal.java
NodeFilter.java NodeIterator.java TreeWalker.java
Log:
Updated to new DOM API, so we match with Xerces 1.2.1. Updated
Xalan code to use isSupported instead of supports.
Revision Changes Path
1.7 +2 -2
xml-xalan/java/src/org/apache/xalan/templates/ElemForEach.java
Index: ElemForEach.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemForEach.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ElemForEach.java 2000/11/13 16:27:10 1.6
+++ ElemForEach.java 2000/11/15 19:41:04 1.7
@@ -421,7 +421,7 @@
template = sroot.getDefaultRule();
break;
case Node.CDATA_SECTION_NODE :
- if (child.supports(SaxEventDispatch.SUPPORTSINTERFACE,
"1.0"))
+ if (child.isSupported(SaxEventDispatch.SUPPORTSINTERFACE,
"1.0"))
{
((SaxEventDispatch) child).dispatchSaxEvent(rth);
}
@@ -437,7 +437,7 @@
continue;
case Node.TEXT_NODE :
- if (child.supports(SaxEventDispatch.SUPPORTSINTERFACE,
"1.0"))
+ if (child.isSupported(SaxEventDispatch.SUPPORTSINTERFACE,
"1.0"))
{
((SaxEventDispatch) child).dispatchSaxEvent(rth);
}
1.6 +13 -7 xml-xalan/java/src/org/apache/xalan/utils/UnImplNode.java
Index: UnImplNode.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/utils/UnImplNode.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- UnImplNode.java 2000/10/30 18:57:27 1.5
+++ UnImplNode.java 2000/11/15 19:41:05 1.6
@@ -702,14 +702,20 @@
}
/**
- * Unimplemented.
- *
- * NEEDSDOC @param feature
- * NEEDSDOC @param version
- *
- * NEEDSDOC ($objectName$) @return
+ * 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
+ * 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
+ * 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>.
+ * @return Returns <code>true</code> if the specified feature is
+ * supported on this node, <code>false</code> otherwise.
+ * @since DOM Level 2
*/
- public boolean supports(String feature, String version)
+ public boolean isSupported(String feature, String version)
{
return false;
}
1.3 +1 -1
xml-xalan/java/src/org/apache/xpath/axes/AttributeWalkerOneStep.java
Index: AttributeWalkerOneStep.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xpath/axes/AttributeWalkerOneStep.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AttributeWalkerOneStep.java 2000/10/30 18:58:43 1.2
+++ AttributeWalkerOneStep.java 2000/11/15 19:41:05 1.3
@@ -134,7 +134,7 @@
Node current = this.getCurrentNode();
- if (current.supports(FEATURE_NODETESTFILTER, "1.0"))
+ if (current.isSupported(FEATURE_NODETESTFILTER, "1.0"))
((NodeTestFilter) current).setNodeTest(this);
Node next = null;
1.10 +1 -1 xml-xalan/java/src/org/apache/xpath/axes/AxesWalker.java
Index: AxesWalker.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/axes/AxesWalker.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- AxesWalker.java 2000/11/14 18:48:18 1.9
+++ AxesWalker.java 2000/11/15 19:41:05 1.10
@@ -1338,7 +1338,7 @@
Node current = this.getCurrentNode();
- if (current.supports(FEATURE_NODETESTFILTER, "1.0"))
+ if (current.isSupported(FEATURE_NODETESTFILTER, "1.0"))
((NodeTestFilter) current).setNodeTest(this);
Node next = this.firstChild();
1.3 +1 -1
xml-xalan/java/src/org/apache/xpath/axes/ChildWalkerMultiStep.java
Index: ChildWalkerMultiStep.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xpath/axes/ChildWalkerMultiStep.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ChildWalkerMultiStep.java 2000/10/30 18:58:47 1.2
+++ ChildWalkerMultiStep.java 2000/11/15 19:41:06 1.3
@@ -94,7 +94,7 @@
Node current = this.getCurrentNode();
- if (current.supports(FEATURE_NODETESTFILTER, "1.0"))
+ if (current.isSupported(FEATURE_NODETESTFILTER, "1.0"))
((NodeTestFilter) current).setNodeTest(this);
Node next = (m_root == m_currentNode)
1.2 +59 -53 xml-xalan/java/src/org/w3c/dom/Attr.java
Index: Attr.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/Attr.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Attr.java 2000/10/02 02:43:14 1.1
+++ Attr.java 2000/11/15 19:41:06 1.2
@@ -6,8 +6,8 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom;
@@ -16,90 +16,96 @@
* 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
- * since they are not actually child nodes of the element they describe,
the
- * DOM does not consider them part of the document tree. Thus, the
- * <code>Node</code> attributes <code>parentNode</code> ,
- * <code>previousSibling</code> , and <code>nextSibling</code> have a
- * <code>null</code> value for <code>Attr</code> objects. The DOM takes the
- * view that attributes are properties of elements rather than having a
- * separate identity from the elements they are associated with; this
should
+ * <p><code>Attr</code> objects inherit the <code>Node</code> interface, but
+ * since they are not actually child nodes of the element they describe, the
+ * DOM does not consider them part of the document tree. Thus, the
+ * <code>Node</code> attributes <code>parentNode</code>,
+ * <code>previousSibling</code>, and <code>nextSibling</code> have a
+ * <code>null</code> value for <code>Attr</code> objects. The DOM takes the
+ * view that attributes are properties of elements rather than having a
+ * separate identity from the elements they are associated with; this should
* make it more efficient to implement such features as default attributes
- * associated with all elements of a given type. Furthermore,
+ * associated with all elements of a given type. Furthermore,
* <code>Attr</code> nodes may not be immediate children of a
- * <code>DocumentFragment</code> . However, they can be associated with
- * <code>Element</code> nodes contained within a
<code>DocumentFragment</code>
- * . In short, users and implementors of the 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
- * 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
- * default value is the attribute's effective value; otherwise, the
- * 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).
- * <p> In XML, where the value of an attribute can contain entity
references,
- * the child nodes of the <code>Attr</code> node provide a representation in
- * which entity references are not expanded. These child nodes may be either
- * <code>Text</code> or <code>EntityReference</code> nodes. Because the
- * attribute type may be unknown, there are no tokenized attribute values.
+ * <code>DocumentFragment</code>. However, they can be associated with
+ * <code>Element</code> nodes contained within a
+ * <code>DocumentFragment</code>. In short, users and implementors of the
+ * 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
+ * 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
+ * default value is the attribute's effective value; otherwise, the
+ * 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).
+ * <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.
+ * <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();
/**
- * If this attribute was explicitly given a value in the original
- * document, this is <code>true</code> ; otherwise, it is
- * <code>false</code> . Note that the implementation is in charge of
this
+ * If this attribute was explicitly given a value in the original
+ * document, this is <code>true</code>; otherwise, it is
+ * <code>false</code>. Note that the implementation is in charge of this
* attribute, not the user. If the user changes the value of the
* attribute (even if it ends up having the same value as the default
* value) then the <code>specified</code> flag is automatically flipped
- * to <code>true</code> . To re-specify the attribute as the default
+ * to <code>true</code>. To re-specify the attribute as the default
* value from the DTD, the user must delete the attribute. The
* 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
- * then <code>specified</code> is <code>true</code> , and the value is
- * 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
+ * <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
+ * then <code>specified</code> is <code>true</code>, and the value is
+ * 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
- * the document and has a value of #IMPLIED in the DTD, then the
- * attribute does not appear in the structure model of the document.
+ * 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
+ * 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
+ * <code>true</code>.
*/
public boolean getSpecified();
/**
- * On retrieval, the value of the attribute is returned as a string.
+ * 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
+ * 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
+ * <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>
+ * also the method <code>setAttribute</code> on the <code>Element</code>
* interface.
* @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
+ * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
*/
public String getValue();
public void setValue(String value)
throws DOMException;
/**
- * The <code>Element</code> node this attribute is attached to or
+ * The <code>Element</code> node this attribute is attached to or
* <code>null</code> if this attribute is not in use.
* @since DOM Level 2
*/
public Element getOwnerElement();
}
-
1.2 +17 -17 xml-xalan/java/src/org/w3c/dom/CDATASection.java
Index: CDATASection.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/CDATASection.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CDATASection.java 2000/10/02 02:43:14 1.1
+++ CDATASection.java 2000/11/15 19:41:06 1.2
@@ -6,43 +6,43 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom;
/**
- * CDATA sections are used to escape blocks of text containing characters
- * that would otherwise be regarded as markup. The only delimiter that is
- * recognized in a CDATA section is the "]]>" string that ends the CDATA
- * section. CDATA sections cannot be nested. Their primary purpose is for
+ * CDATA sections are used to escape blocks of text containing characters
that
+ * would otherwise be regarded as markup. The only delimiter that is
+ * recognized in a CDATA section is the "]]>" string that ends the CDATA
+ * section. CDATA sections cannot be nested. Their primary purpose is for
* including material such as XML fragments, without needing to escape all
* the delimiters.
- * <p> The <code>DOMString</code> attribute of the <code>Text</code> node
- * holds the text that is contained by the CDATA section. Note that this
may
+ * <p>The <code>DOMString</code> attribute of the <code>Text</code> node
holds
+ * the text that is contained by the CDATA section. Note that this may
* 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
* <code>CharacterData</code> interface through the <code>Text</code>
- * interface. Adjacent <code>CDATASections</code> nodes are not merged by
use
- * of the <code>normalize</code> method of the <code>Element</code>
interface.
- * Because no markup is recognized within a <code>CDATASection</code> ,
+ * interface. Adjacent <code>CDATASection</code> nodes are not merged by use
+ * of the <code>normalize</code> method of the <code>Node</code> interface.
+ * Because no markup is recognized within a <code>CDATASection</code>,
* character numeric references cannot be used as an escape mechanism when
* serializing. Therefore, action needs to be taken when serializing a
* <code>CDATASection</code> with a character encoding where some of the
* contained characters cannot be represented. Failure to do so would not
- * produce well-formed XML. One potential solution in the serialization
+ * produce well-formed XML.One potential solution in the serialization
* process is to end the CDATA section before the character, output the
- * character using a character reference or entity reference, and open a
new
- * CDATA section for any further characters in the text node. Note,
however,
- * that some code conversion libraries at the time of writing do not return
- * an error or exception when a character is missing from the encoding,
+ * character using a character reference or entity reference, and open a new
+ * CDATA section for any further characters in the text node. Note, however,
+ * that some code conversion libraries at the time of writing do not return
+ * an error or exception when a character is missing from the encoding,
* making the task of ensuring that data is not corrupted on serialization
* more difficult.
+ * <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 CDATASection extends Text {
}
-
1.2 +58 -59 xml-xalan/java/src/org/w3c/dom/CharacterData.java
Index: CharacterData.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/CharacterData.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CharacterData.java 2000/10/02 02:43:14 1.1
+++ CharacterData.java 2000/11/15 19:41:06 1.2
@@ -6,135 +6,135 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom;
/**
- * The <code>CharacterData</code> interface extends Node with a set of
- * attributes and methods for accessing character data in the DOM. For
+ * The <code>CharacterData</code> interface extends Node with a set of
+ * attributes and methods for accessing character data in the DOM. For
* clarity this set is defined here rather than on each object that uses
* these attributes and methods. No DOM objects correspond directly to
- * <code>CharacterData</code> , though <code>Text</code> and others do
+ * <code>CharacterData</code>, though <code>Text</code> and others do
* inherit the interface from it. All <code>offsets</code> in this interface
- * start from 0.
- * <p> As explained in the <code>DOMString</code> interface, text strings in
- * the DOM are represented in UTF-16, i.e. as a sequence of 16-bit units.
In
- * the following, the term 16-bit units is used whenever necessary to
+ * start from <code>0</code>.
+ * <p>As explained in the <code>DOMString</code> interface, text strings in
+ * the DOM are represented in UTF-16, i.e. as a sequence of 16-bit units. In
+ * the following, the term 16-bit units is used whenever necessary to
* indicate that indexing on CharacterData is done in 16-bit units.
+ * <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 CharacterData extends Node {
/**
- * 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
+ * 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.
+ * 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
+ * DOMSTRING_SIZE_ERR: Raised when it would return more characters
than
+ * fit in a <code>DOMString</code> variable on the implementation
* platform.
*/
public String getData()
- throws DOMException;
+ throws DOMException;
public void setData(String data)
- throws DOMException;
+ throws DOMException;
/**
- * The number of 16-bit units that are available through
- * <code>data</code> and the <code>substringData</code> method below.
- * This may have the value zero, i.e., <code>CharacterData</code> nodes
- * may be empty.
+ * The number of 16-bit units that are available through
<code>data</code>
+ * and the <code>substringData</code> method below. This may have the
+ * value zero, i.e., <code>CharacterData</code> nodes may be empty.
*/
public int getLength();
/**
- * Extracts a range of data from the node.
- * @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
+ * Extracts a range of data from the node.
+ * @param offsetStart offset of substring to extract.
+ * @param countThe 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.
* @exception DOMException
- * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
+ * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
* negative or greater than the number of 16-bit units in
- * <code>data</code> , or if the specified <code>count</code> is
+ * <code>data</code>, or if the specified <code>count</code> is
* negative.
- * <br> DOMSTRING_SIZE_ERR: Raised if the specified range of text does
- * not fit into a <code>DOMString</code> .
+ * <br>DOMSTRING_SIZE_ERR: Raised if the specified range of text does
+ * not fit into a <code>DOMString</code>.
*/
public String substringData(int offset,
int count)
throws DOMException;
/**
- * Append the string to the end of the character data of the node. Upon
+ * 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 arg The <code>DOMString</code> to append.
+ * @param argThe <code>DOMString</code> to append.
* @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
+ * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
public void appendData(String arg)
throws DOMException;
/**
- * Insert a string at the specified character offset.
- * @param offset The character offset at which to insert.
- * @param arg The <code>DOMString</code> to insert.
+ * 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.
* @exception DOMException
- * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
+ * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
* negative or greater than the number of 16-bit units in
- * <code>data</code> .
- * <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
+ * <code>data</code>.
+ * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
public void insertData(int offset,
String arg)
throws DOMException;
/**
- * Remove a range of 16-bit units from the node. Upon success,
+ * Remove a range of 16-bit units from the node. Upon success,
* <code>data</code> and <code>length</code> reflect the change.
- * @param offset The offset from which to start removing.
- * @param count The number of 16-bit units to delete. If the sum of
+ * @param offsetThe offset from which to start removing.
+ * @param countThe 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.
* @exception DOMException
- * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
+ * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
* negative or greater than the number of 16-bit units in
- * <code>data</code> , or if the specified <code>count</code> is
+ * <code>data</code>, or if the specified <code>count</code> is
* negative.
- * <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
+ * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
public void deleteData(int offset,
int count)
throws DOMException;
/**
- * Replace the characters starting at the specified 16-bit unit offset
+ * Replace the characters starting at the specified 16-bit unit offset
* with the specified string.
- * @param offset The offset from which to start replacing.
- * @param count The number of 16-bit units to replace. If the sum of
+ * @param offsetThe offset from which to start replacing.
+ * @param countThe 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 arg The <code>DOMString</code> with which the range must be
+ * <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
* replaced.
* @exception DOMException
- * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
+ * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
* negative or greater than the number of 16-bit units in
- * <code>data</code> , or if the specified <code>count</code> is
+ * <code>data</code>, or if the specified <code>count</code> is
* negative.
- * <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
+ * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
public void replaceData(int offset,
int count,
@@ -142,4 +142,3 @@
throws DOMException;
}
-
1.2 +7 -7 xml-xalan/java/src/org/w3c/dom/Comment.java
Index: Comment.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/Comment.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Comment.java 2000/10/02 02:43:14 1.1
+++ Comment.java 2000/11/15 19:41:06 1.2
@@ -6,19 +6,19 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom;
/**
- * This interface inherits from <code>CharacterData</code> and represents
the
+ * This interface inherits from <code>CharacterData</code> and represents
the
* content of a comment, i.e., all the characters between the starting '
- * <code><!--</code> ' and ending '<code>--></code> '. Note that this
- * is the definition of a comment in XML, and, in practice, HTML, although
- * some HTML tools may implement the full SGML comment structure.
+ * <code><!--</code>' and ending '<code>--></code>'. Note that this is
+ * the definition of a comment in XML, and, in practice, HTML, although some
+ * HTML tools may implement the full SGML comment structure.
+ * <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 Comment extends CharacterData {
}
-
1.2 +71 -25 xml-xalan/java/src/org/w3c/dom/DOMException.java
Index: DOMException.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/DOMException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DOMException.java 2000/10/02 02:43:14 1.1
+++ DOMException.java 2000/11/15 19:41:06 1.2
@@ -6,27 +6,28 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom;
/**
- * DOM operations only raise exceptions in "exceptional" circumstances,
- * i.e., when an operation is impossible to perform (either for logical
- * reasons, 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> .
- * <p> Implementations may raise other exceptions under other circumstances.
- * For example, implementations may raise an implementation-dependent
+ * DOM operations only raise exceptions in "exceptional" circumstances,
i.e.,
+ * when an operation is impossible to perform (either for logical reasons,
+ * 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>.
+ * <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.
- * <p> Some languages and object systems do not support the concept of
+ * <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,
methods
- * may return error codes similar to those listed in the corresponding
method
- * descriptions.
+ * native error reporting mechanisms. For some bindings, for example,
+ * methods may return error codes similar to those listed in the
+ * corresponding method descriptions.
+ * <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 class DOMException extends RuntimeException {
public DOMException(short code, String message) {
@@ -35,36 +36,81 @@
}
public short code;
// ExceptionCode
+ /**
+ * If index or size is negative, or greater than the allowed value
+ */
public static final short INDEX_SIZE_ERR = 1;
+ /**
+ * If the specified range of text does not fit into a DOMString
+ */
public static final short DOMSTRING_SIZE_ERR = 2;
+ /**
+ * If any node is inserted somewhere it doesn't belong
+ */
public static final short HIERARCHY_REQUEST_ERR = 3;
+ /**
+ * If a node is used in a different document than the one that created
it
+ * (that doesn't support it)
+ */
public static final short WRONG_DOCUMENT_ERR = 4;
+ /**
+ * If an invalid or illegal character is specified, such as in a name.
See
+ * production 2 in the XML specification for the definition of a legal
+ * character, and production 5 for the definition of a legal name
+ * character.
+ */
public static final short INVALID_CHARACTER_ERR = 5;
+ /**
+ * If data is specified for a node which does not support data
+ */
public static final short NO_DATA_ALLOWED_ERR = 6;
+ /**
+ * If an attempt is made to modify an object where modifications are not
+ * allowed
+ */
public static final short NO_MODIFICATION_ALLOWED_ERR = 7;
+ /**
+ * If an attempt is made to reference a node in a context where it does
+ * not exist
+ */
public static final short NOT_FOUND_ERR = 8;
+ /**
+ * If the implementation does not support the requested type of object
or
+ * operation.
+ */
public static final short NOT_SUPPORTED_ERR = 9;
+ /**
+ * If an attempt is made to add an attribute that is already in use
+ * elsewhere
+ */
public static final short INUSE_ATTRIBUTE_ERR = 10;
- /**
+ /**
+ * If an attempt is made to use an object that is not, or is no longer,
+ * usable.
* @since DOM Level 2
- */
+ */
public static final short INVALID_STATE_ERR = 11;
- /**
+ /**
+ * If an invalid or illegal string is specified.
* @since DOM Level 2
- */
+ */
public static final short SYNTAX_ERR = 12;
- /**
+ /**
+ * If an attempt is made to modify the type of the underlying object.
* @since DOM Level 2
- */
+ */
public static final short INVALID_MODIFICATION_ERR = 13;
- /**
+ /**
+ * If an attempt is made to create or change an object in a way which is
+ * incorrect with regard to namespaces.
* @since DOM Level 2
- */
+ */
public static final short NAMESPACE_ERR = 14;
- /**
+ /**
+ * If a parameter or an operation is not supported by the underlying
+ * object.
* @since DOM Level 2
- */
+ */
public static final short INVALID_ACCESS_ERR = 15;
}
-
1.2 +47 -44 xml-xalan/java/src/org/w3c/dom/DOMImplementation.java
Index: DOMImplementation.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/DOMImplementation.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DOMImplementation.java 2000/10/02 02:43:14 1.1
+++ DOMImplementation.java 2000/11/15 19:41:06 1.2
@@ -6,33 +6,35 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom;
/**
- * The <code>DOMImplementation</code> interface provides a number of
methods
+ * The <code>DOMImplementation</code> interface provides a number of methods
* for performing operations that are independent of any particular instance
* of the document object model.
+ * <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 DOMImplementation {
/**
- * Test if the DOM implementation implements a specific feature.
- * @param feature The name of the feature to test (case-insensitive).
The
- * legal values are defined throughout this specification 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 spec should be made unique by reversing the name of
- * the Internet domain name of the person (or the organization that
- * person belongs to) who defines the feature, component by component,
- * and use this as a prefix. For instance, the W3C SYMM Working Group
- * defines the feature "org.w3c.dom.smil".
- * @param version This is the version number of the feature to test. In
- * Level 2, this is the string "2.0". If the version is not specified,
- * supporting any version of the feature causes the method to return
- * <code>true</code> .
+ * Test if the DOM implementation implements a specific feature.
+ * @param featureThe 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
+ * 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>.
* @return <code>true</code> if the feature is implemented in the
* specified version, <code>false</code> otherwise.
*/
@@ -40,22 +42,22 @@
String version);
/**
- * Creates an empty <code>DocumentType</code> node. Entity declarations
+ * Creates an empty <code>DocumentType</code> node. Entity declarations
* and notations are not made available. Entity reference expansions and
- * default attribute additions do not occur. It is expected that a
future
- * version of the DOM will provide a way for populating a
- * <code>DocumentType</code> .
- * <br> HTML-only DOM implementations do not need to implement this
method.
- * @param qualifiedName The qualified name of the document type to be
+ * 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 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> .
+ * @param publicIdThe external subset public identifier.
+ * @param systemIdThe external subset system identifier.
+ * @return A new <code>DocumentType</code> node with
+ * <code>Node.ownerDocument</code> set to <code>null</code>.
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified qualified name
+ * INVALID_CHARACTER_ERR: Raised if the specified qualified name
* contains an illegal character.
- * <br> NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
+ * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
* malformed.
* @since DOM Level 2
*/
@@ -65,27 +67,29 @@
throws DOMException;
/**
- * Creates an XML <code>Document</code> object of the specified type
with
+ * 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 namespaceURI The namespace URI of the document element to
- * create, or <code>null</code> .
- * @param qualifiedName The qualified name of the document element to
be
+ * @param namespaceURIThe namespace URI of the document element to
create.
+ * @param qualifiedNameThe qualified name of the document element to be
* created.
- * @param doctype The type of document to be created or
<code>null</code>
- * . When <code>doctype</code> is not <code>null</code> , its
+ * @param doctypeThe 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.
- * @return A new <code>Document</code> object.
+ * @return A new <code>Document</code> object.
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified qualified name
+ * INVALID_CHARACTER_ERR: Raised if the specified qualified name
* contains an illegal character.
- * <br> NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
- * malformed, 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> WRONG_DOCUMENT_ERR: Raised if <code>doctype</code> has already
- * been used with a different document.
+ * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
+ * malformed, 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>WRONG_DOCUMENT_ERR: Raised if <code>doctype</code> has already
+ * been used with a different document or was created from a different
+ * implementation.
* @since DOM Level 2
*/
public Document createDocument(String namespaceURI,
@@ -94,4 +98,3 @@
throws DOMException;
}
-
1.2 +203 -206 xml-xalan/java/src/org/w3c/dom/Document.java
Index: Document.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/Document.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Document.java 2000/10/02 02:43:14 1.1
+++ Document.java 2000/11/15 19:41:06 1.2
@@ -6,263 +6,264 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom;
/**
- * The <code>Document</code> interface represents the entire HTML or XML
+ * The <code>Document</code> interface represents the entire HTML or XML
* document. Conceptually, it is the root of the document tree, and provides
- * the primary access to the document's data.
- * <p> Since elements, text nodes, comments, processing instructions, etc.
- * cannot exist outside the context of a <code>Document</code> , the
+ * the primary access to the document's data.
+ * <p>Since elements, text nodes, comments, processing instructions, etc.
+ * cannot exist outside the context of a <code>Document</code>, the
* <code>Document</code> interface also contains the factory methods needed
* to create these objects. The <code>Node</code> objects created have a
* <code>ownerDocument</code> attribute which associates them with the
* <code>Document</code> within whose context they were created.
+ * <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 Document extends Node {
/**
- * The Document Type Declaration (see <code>DocumentType</code> )
+ * The Document Type Declaration (see <code>DocumentType</code>)
* associated with this document. For HTML documents as well as XML
* documents without a document type declaration this returns
- * <code>null</code> . The DOM Level 2 does not support editing the
- * Document Type Declaration, therefore <code>docType</code> cannot be
- * altered in any way, including through the use of methods, such as
- * <code>insertNode</code> or <code>removeNode</code> , inherited from
- * <code>Node</code> .
+ * <code>null</code>. The DOM Level 2 does not support editing the
+ * Document Type Declaration. <code>docType</code> cannot be altered in
+ * any way, including through the use of methods inherited from the
+ * <code>Node</code> interface, such as <code>insertNode</code> or
+ * <code>removeNode</code>.
*/
public DocumentType getDoctype();
/**
- * The <code>DOMImplementation</code> object that handles this
document.
- * A DOM application may use objects from multiple implementations.
+ * The <code>DOMImplementation</code> object that handles this document.
A
+ * DOM application may use objects from multiple implementations.
*/
public DOMImplementation getImplementation();
/**
- * This is a convenience attribute that allows direct access to the
child
- * node that is the root element of the document. For HTML documents,
+ * This is a convenience attribute that allows direct access to the
child
+ * node that is the root element of the document. For HTML documents,
* this is the element with the tagName "HTML".
*/
public Element getDocumentElement();
/**
- * Creates an element of the type specified. Note that the instance
+ * Creates an element of the type specified. Note that the instance
* returned implements the <code>Element</code> interface, so attributes
- * can be specified directly on the returned object.
- * <br> In addition, if there are known attributes with default values,
- * <code>Attr</code> nodes representing them are automatically created
and
- * attached to the element.
- * <br> To create an element with a qualified name and namespace URI,
use
+ * can be specified directly on the returned object.
+ * <br>In addition, if there are known attributes with default values,
+ * <code>Attr</code> nodes representing them are automatically created
+ * and attached to the element.
+ * <br>To create an element with a qualified name and namespace URI, use
* the <code>createElementNS</code> method.
- * @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.
- * @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
- * <code>namespaceURI</code> set to <code>null</code> .
+ * @param tagNameThe 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.
+ * @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
+ * <code>namespaceURI</code> set to <code>null</code>.
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified name contains an
+ * INVALID_CHARACTER_ERR: Raised if the specified name contains an
* illegal character.
*/
public Element createElement(String tagName)
throws DOMException;
/**
- * Creates an empty <code>DocumentFragment</code> object.
- * @return A new <code>DocumentFragment</code> .
+ * 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 data The data for the node.
- * @return The new <code>Text</code> object.
+ * Creates a <code>Text</code> node given the specified string.
+ * @param dataThe 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 data The data for the node.
- * @return The new <code>Comment</code> object.
+ * Creates a <code>Comment</code> node given the specified string.
+ * @param dataThe data for the node.
+ * @return The new <code>Comment</code> object.
*/
public Comment createComment(String data);
/**
- * Creates a <code>CDATASection</code> node whose value is the
specified
+ * Creates a <code>CDATASection</code> node whose value is the specified
* string.
- * @param data The data for the <code>CDATASection</code> contents.
- * @return The new <code>CDATASection</code> object.
+ * @param dataThe 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.
+ * NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
*/
public CDATASection createCDATASection(String data)
throws DOMException;
/**
- * Creates a <code>ProcessingInstruction</code> node given the
specified
+ * Creates a <code>ProcessingInstruction</code> node given the specified
* name and data strings.
- * @param target The target part of the processing instruction.
- * @param data The data for the node.
- * @return The new <code>ProcessingInstruction</code> object.
+ * @param targetThe target part of the processing instruction.
+ * @param dataThe data for the node.
+ * @return The new <code>ProcessingInstruction</code> object.
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified target contains an
+ * INVALID_CHARACTER_ERR: Raised if the specified target contains an
* illegal character.
- * <br> NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
+ * <br>NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
*/
public ProcessingInstruction createProcessingInstruction(String target,
String data)
throws
DOMException;
/**
- * Creates an <code>Attr</code> of the given name. Note that the
+ * Creates an <code>Attr</code> of the given name. Note that the
* <code>Attr</code> instance can then be set on an <code>Element</code>
- * using the <code>setAttribute</code> method.
- * <br> To create an attribute with a qualified name and namespace URI,
use
- * the <code>createAttributeNS</code> method.
- * @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
- * <code>null</code> .
+ * 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.
+ * @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
+ * <code>null</code>. The value of the attribute is the empty string.
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified name contains an
+ * INVALID_CHARACTER_ERR: Raised if the specified name contains an
* illegal character.
*/
public Attr createAttribute(String name)
throws DOMException;
/**
- * Creates an <code>EntityReference</code> object. In addition, if the
+ * Creates an <code>EntityReference</code> object. In addition, if the
* referenced entity is known, the child list of the
* <code>EntityReference</code> node is made the same as that of the
- * corresponding <code>Entity</code> node. If any descendant of the
- * <code>Entity</code> node has an unbound namespace prefix , the
+ * corresponding <code>Entity</code> node.If any descendant of the
+ * <code>Entity</code> node has an unbound namespace prefix, the
* corresponding descendant of the created <code>EntityReference</code>
* node is also unbound; (its <code>namespaceURI</code> is
- * <code>null</code> ). The DOM Level 2 does not support any mechanism
to
+ * <code>null</code>). The DOM Level 2 does not support any mechanism to
* resolve namespace prefixes.
- * @param name The name of the entity to reference.
- * @return The new <code>EntityReference</code> object.
+ * @param nameThe 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
+ * INVALID_CHARACTER_ERR: Raised if the specified name contains an
* illegal character.
- * <br> NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
+ * <br>NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
*/
public EntityReference createEntityReference(String name)
throws DOMException;
/**
- * Returns a <code>NodeList</code> of all the <code>Elements</code>
with
- * a given tag name in the order in which they would be encountered in a
+ * 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 tagname The name of the tag to match on. The special value
"*"
+ * @param tagnameThe 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> .
+ * @return A new <code>NodeList</code> object containing all the matched
+ * <code>Elements</code>.
*/
public NodeList getElementsByTagName(String tagname);
/**
- * Imports a node from another document to this document. The returned
- * node has no parent; (<code>parentNode</code> is <code>null</code> ).
+ * Imports a node from another document to this document. The returned
+ * node has no parent; (<code>parentNode</code> is <code>null</code>).
* The source node is not altered or removed from the original document;
* this method creates a new copy of the source node.
- * <br> For all nodes, importing a node creates a node object owned by
the
+ * <br>For all nodes, importing a node creates a node object owned by
the
* importing document, with attribute values identical to the source
- * node's <code>nodeName</code> and <code>nodeType</code> , plus the
- * attributes related to namespaces (<code>prefix</code> ,
- * <code>localName</code> , and <code>namespaceURI</code> ). As in the
- * <code>cloneNode</code> operation on a <code>Node</code> , the source
+ * node's <code>nodeName</code> and <code>nodeType</code>, plus the
+ * attributes related to namespaces (<code>prefix</code>,
+ * <code>localName</code>, and <code>namespaceURI</code>). As in the
+ * <code>cloneNode</code> operation on a <code>Node</code>, the source
* node is not altered.
- * <br> Additional information is copied as appropriate to the
- * <code>nodeType</code> , attempting to mirror the behavior expected if
a
- * fragment of XML or HTML source was copied from one document to
- * another, recognizing that the two documents may have different DTDs
in
- * the XML case. The following list describes the specifics for every
+ * <br>Additional information is copied as appropriate to the
+ * <code>nodeType</code>, attempting to mirror the behavior expected if
+ * a fragment of XML or HTML source was copied from one document to
+ * another, recognizing that the two documents may have different DTDs
+ * in the XML case. The following list describes the specifics for each
* type of node.
* <dl>
- * <dt> ELEMENT_NODE</dt>
- * <dd> Specified attribute nodes of the source
- * element are imported, and the generated <code>Attr</code> nodes are
- * attached to the generated <code>Element</code> . Default attributes
- * are not copied, though if the document being imported into defines
- * default attributes for this element name, those are assigned. If the
- * <code>importNode</code> <code>deep</code> parameter was set to
- * <code>true</code> , the descendants of the source element will be
- * recursively imported and the resulting nodes reassembled to form the
- * corresponding subtree.</dd>
- * <dt> ATTRIBUTE_NODE</dt>
- * <dd> The <code>specified</code> flag
- * is set to <code>true</code> on the generated <code>Attr</code> . The
+ * <dt>ATTRIBUTE_NODE</dt>
+ * <dd>The <code>ownerElement</code> attribute
+ * is set to <code>null</code> and the <code>specified</code> flag is
+ * set to <code>true</code> on the generated <code>Attr</code>. The
* descendants of the source <code>Attr</code> are recursively imported
- * and the resulting nodes reassembled to form the corresponding
subtree.
- * Note that the <code>deep</code> parameter does not apply to
+ * and the resulting nodes reassembled to form the corresponding subtree.
+ * Note that the <code>deep</code> parameter has no effect on
* <code>Attr</code> nodes; they always carry their children with them
* when imported.</dd>
- * <dt> TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE</dt>
- * <dd> These three
- * 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>
- * <dt> ENTITY_REFERENCE_NODE</dt>
- * <dd> Only the
- * <code>EntityReference</code> itself is copied, even if a
- * <code>deep</code> import is requested, since the source and
- * destination documents might have defined the entity differently. If
- * the document being imported into provides a definition for this
entity
- * name, its value is assigned.</dd>
- * <dt> ENTITY_NODE</dt>
- * <dd><code>Entity</code> nodes can
- * be imported, however in the current release of the DOM the
+ * <dt>DOCUMENT_FRAGMENT_NODE</dt>
+ * <dd>If the <code>deep</code> option
+ * was set to <code>true</code>, the descendants of the source element
+ * are recursively imported and the resulting nodes reassembled to form
+ * the corresponding subtree. Otherwise, this simply generates an empty
+ * <code>DocumentFragment</code>.</dd>
+ * <dt>DOCUMENT_NODE</dt>
+ * <dd><code>Document</code>
+ * nodes cannot be imported.</dd>
+ * <dt>DOCUMENT_TYPE_NODE</dt>
+ * <dd><code>DocumentType</code>
+ * nodes cannot be imported.</dd>
+ * <dt>ELEMENT_NODE</dt>
+ * <dd>Specified attribute nodes of the
+ * source element are imported, and the generated <code>Attr</code>
+ * nodes are attached to the generated <code>Element</code>. Default
+ * attributes are not copied, though if the document being imported into
+ * defines default attributes for this element name, those are assigned.
+ * If the <code>importNode</code> <code>deep</code> parameter was set to
+ * <code>true</code>, the descendants of the source element are
+ * recursively imported and the resulting nodes reassembled to form the
+ * corresponding subtree.</dd>
+ * <dt>ENTITY_NODE</dt>
+ * <dd><code>Entity</code> nodes can be
+ * imported, however in the current release of the DOM the
* <code>DocumentType</code> is readonly. Ability to add these imported
* nodes to a <code>DocumentType</code> will be considered for addition
- * to a future release of the DOM. On import, the <code>publicId</code>
,
- * <code>systemId</code> , and <code>notationName</code> attributes are
- * copied. If a <code>deep</code> import is requested, the descendants
of
- * the the source <code>Entity</code> is recursively imported and the
- * resulting nodes reassembled to form the corresponding subtree.</dd>
- * <dt>
+ * to a future release of the DOM.On import, the <code>publicId</code>,
+ * <code>systemId</code>, and <code>notationName</code> attributes are
+ * copied. If a <code>deep</code> import is requested, the descendants
+ * of the the source <code>Entity</code> are recursively imported and
+ * the resulting nodes reassembled to form the corresponding
subtree.</dd>
+ * <dt>
+ * ENTITY_REFERENCE_NODE</dt>
+ * <dd>Only the <code>EntityReference</code> itself is
+ * copied, even if a <code>deep</code> import is requested, since the
+ * source and destination documents might have defined the entity
+ * differently. If the document being imported into provides a
+ * definition for this entity name, its value is assigned.</dd>
+ * <dt>NOTATION_NODE</dt>
+ * <dd>
+ * <code>Notation</code> nodes can be imported, however in the current
+ * release of the DOM the <code>DocumentType</code> is readonly. Ability
+ * to add these imported nodes to a <code>DocumentType</code> will be
+ * considered for addition to a future release of the DOM.On import, the
+ * <code>publicId</code> and <code>systemId</code> attributes are copied.
+ * Note that the <code>deep</code> parameter has no effect on
+ * <code>Notation</code> nodes since they never have any children.</dd>
+ * <dt>
* PROCESSING_INSTRUCTION_NODE</dt>
- * <dd> The imported node copies its
+ * <dd>The imported node copies its
* <code>target</code> and <code>data</code> values from those of the
* source node.</dd>
- * <dt> DOCUMENT_NODE</dt>
- * <dd><code>Document</code> nodes cannot be
- * imported.</dd>
- * <dt> DOCUMENT_TYPE_NODE</dt>
- * <dd><code>DocumentType</code> nodes cannot be
- * imported.</dd>
- * <dt> DOCUMENT_FRAGMENT_NODE</dt>
- * <dd> If the <code>deep</code> option was
- * set <code>true</code> , the descendants of the source element will be
- * recursively imported and the resulting nodes reassembled to form the
- * corresponding subtree. Otherwise, this simply generates an empty
- * <code>DocumentFragment</code> .</dd>
- * <dt> NOTATION_NODE</dt>
- * <dd><code>Notation</code>
- * nodes can be imported, however in the current release of the DOM the
- * <code>DocumentType</code> is readonly. Ability to add these imported
- * nodes to a <code>DocumentType</code> will be considered for addition
- * to a future release of the DOM. On import, the <code>publicId</code>
- * and <code>systemId</code> attributes are copied. Note that the
- * <code>deep</code> parameter does not apply to <code>Notation</code>
- * nodes since they never have any children.</dd>
- * </dl>
- * @param importedNode The node to import.
- * @param deep If <code>true</code> , recursively import the subtree
- * under the specified node; if <code>false</code> , import only the
- * node itself, as explained above. This does not apply to
- * <code>Attr</code> , <code>EntityReference</code> , and
- * <code>Notation</code> nodes.
- * @return The imported node that belongs to this <code>Document</code>
.
+ * <dt>TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE</dt>
+ * <dd>These three
+ * 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
+ * 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.
+ * @return The imported node that belongs to this <code>Document</code>.
* @exception DOMException
- * NOT_SUPPORTED_ERR: Raised if the type of node being imported is
not
+ * NOT_SUPPORTED_ERR: Raised if the type of node being imported is not
* supported.
* @since DOM Level 2
*/
@@ -271,28 +272,28 @@
throws DOMException;
/**
- * Creates an element of the given qualified name and namespace URI.
+ * Creates an element of the given qualified name and namespace URI.
* HTML-only DOM implementations do not need to implement this method.
- * @param namespaceURI The namespace URI of the element to create.
- * @param qualifiedName The qualified name of the element type to
+ * @param namespaceURIThe namespace URI of the element to create.
+ * @param qualifiedNameThe qualified name of the element type to
* instantiate.
- * @return A new <code>Element</code> object with the following
- * attributes: Attribute Value<code>Node.nodeName</code>
+ * @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
- * from <code>qualifiedName</code> , or <code>null</code> if there is
no
- * prefix<code>Node.localName</code> local name , extracted from
+ * <code>namespaceURI</code><code>Node.prefix</code>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>
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified qualified name
+ * INVALID_CHARACTER_ERR: Raised if the specified qualified name
* contains an illegal character.
- * <br> NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
+ * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
* malformed, if the <code>qualifiedName</code> has a prefix and the
- * <code>namespaceURI</code> is <code>null</code> or an empty string,
- * 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" .
+ * <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" .
* @since DOM Level 2
*/
public Element createElementNS(String namespaceURI,
@@ -300,33 +301,31 @@
throws DOMException;
/**
- * Creates an attribute of the given qualified name and namespace URI.
+ * Creates an attribute of the given qualified name and namespace URI.
* HTML-only DOM implementations do not need to implement this method.
- * @param namespaceURI The namespace URI of the attribute to create.
- * @param qualifiedName The qualified name of the attribute to
- * instantiate.
- * @return A new <code>Attr</code> object with the following
attributes:
- * Attribute Value<code>Node.nodeName</code> qualifiedName
+ * @param namespaceURIThe namespace URI of the attribute to create.
+ * @param qualifiedNameThe 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
- * <code>qualifiedName</code> , or <code>null</code> if there is no
- * prefix<code>Node.localName</code> local name , extracted from
+ * <code>Node.prefix</code>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>qualifiedName</code><code>Node.nodeValue</code>the empty
+ * string
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified qualified name
+ * INVALID_CHARACTER_ERR: Raised if the specified qualified name
* contains an illegal character.
- * <br> NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
+ * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
* malformed, if the <code>qualifiedName</code> has a prefix and the
- * <code>namespaceURI</code> is <code>null</code> or an empty string,
- * 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", if the
- * <code>qualifiedName</code> has a prefix that is "xmlns" and the
- * <code>namespaceURI</code> is different from
- * "http://www.w3.org/2000/xmlns/", or if the
<code>qualifiedName</code>
- * is "xmlns" and the <code>namespaceURI</code> is different from
- * "http://www.w3.org/2000/xmlns/".
+ * <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>namespaceURI</code> is different from "
+ * http://www.w3.org/2000/xmlns/".
* @since DOM Level 2
*/
public Attr createAttributeNS(String namespaceURI,
@@ -334,35 +333,33 @@
throws DOMException;
/**
- * 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
would
- * be encountered in a preorder traversal of the <code>Document</code>
- * tree.
- * @param namespaceURI The namespace URI of the elements to match on.
- * The special value "*" matches all namespaces.
- * @param localName The local name of the elements to match on. The
+ * 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
+ * special value "*" matches all namespaces.
+ * @param localNameThe 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> .
+ * @return A new <code>NodeList</code> object containing all the matched
+ * <code>Elements</code>.
* @since DOM Level 2
*/
public NodeList getElementsByTagNameNS(String namespaceURI,
String localName);
/**
- * Returns the <code>Element</code> whose <code>ID</code> is given by
- * <code>elementId</code> . If no such element exists, returns
- * <code>null</code> . Behavior is not defined if more than one element
- * has this <code>ID</code> . The DOM implementation must have
- * 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 elementId The unique <code>id</code> value for an element.
- * @return The matching element.
+ * Returns the <code>Element</code> whose <code>ID</code> is given by
+ * <code>elementId</code>. If no such element exists, returns
+ * <code>null</code>. Behavior is not defined if more than one element
+ * has this <code>ID</code>. The DOM implementation must have
+ * 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.
+ * @return The matching element.
* @since DOM Level 2
*/
public Element getElementById(String elementId);
}
-
1.2 +14 -14 xml-xalan/java/src/org/w3c/dom/DocumentFragment.java
Index: DocumentFragment.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/DocumentFragment.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DocumentFragment.java 2000/10/02 02:43:14 1.1
+++ DocumentFragment.java 2000/11/15 19:41:06 1.2
@@ -6,8 +6,8 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom;
@@ -24,29 +24,29 @@
* heavyweight object, depending on the underlying implementation. What is
* really needed for this is a very lightweight object.
* <code>DocumentFragment</code> is such an object.
- * <p> Furthermore, various operations -- such as inserting nodes as
children
+ * <p>Furthermore, various operations -- such as inserting nodes as children
* of another <code>Node</code> -- may take <code>DocumentFragment</code>
- * objects as arguments; this results in all the child nodes of the
+ * objects as arguments; this results in all the child nodes of the
* <code>DocumentFragment</code> being moved to the child list of this node.
- * <p> The children of a <code>DocumentFragment</code> node are zero or more
- * nodes representing the tops of any sub-trees defining the structure of
the
- * document. <code>DocumentFragment</code> nodes do not need to be
+ * <p>The children of a <code>DocumentFragment</code> node are zero or more
+ * nodes representing the tops of any sub-trees defining the structure of
+ * the document. <code>DocumentFragment</code> nodes do not need to be
* well-formed XML documents (although they do need to follow the rules
* imposed upon well-formed XML parsed entities, which can have multiple top
* nodes). For example, a <code>DocumentFragment</code> might have only one
* child and that child node could be a <code>Text</code> node. Such a
* structure model represents neither an HTML document nor a well-formed XML
* document.
- * <p> When a <code>DocumentFragment</code> is inserted into a
- * <code>Document</code> (or indeed any other <code>Node</code> that may
take
- * children) the children of the <code>DocumentFragment</code> and not the
- * <code>DocumentFragment</code> itself are inserted into the
- * <code>Node</code> . This makes the <code>DocumentFragment</code> very
+ * <p>When a <code>DocumentFragment</code> is inserted into a
+ * <code>Document</code> (or indeed any other <code>Node</code> that may
+ * take children) the children of the <code>DocumentFragment</code> and not
+ * the <code>DocumentFragment</code> itself are inserted into the
+ * <code>Node</code>. This makes the <code>DocumentFragment</code> very
* useful when the user wishes to create nodes that are siblings; the
* <code>DocumentFragment</code> acts as the parent of these nodes so that
* the user can use the standard methods from the <code>Node</code>
- * interface, such as <code>insertBefore</code> and <code>appendChild</code>
.
+ * interface, such as <code>insertBefore</code> and <code>appendChild</code>.
+ * <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 DocumentFragment extends Node {
}
-
1.2 +31 -34 xml-xalan/java/src/org/w3c/dom/DocumentType.java
Index: DocumentType.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/DocumentType.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DocumentType.java 2000/10/02 02:43:14 1.1
+++ DocumentType.java 2000/11/15 19:41:06 1.2
@@ -6,77 +6,74 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom;
/**
- * Each <code>Document</code> has a <code>doctype</code> attribute whose
- * value is either <code>null</code> or a <code>DocumentType</code> object.
- * The <code>DocumentType</code> interface in the DOM Core provides an
- * interface to the list of entities that are defined for the document, and
- * little else because the effect of namespaces and the various XML schema
- * efforts on DTD representation are not clearly understood as of this
- * writing.
- * <p> The DOM Level 2 doesn't support editing <code>DocumentType</code>
nodes.
+ * Each <code>Document</code> has a <code>doctype</code> attribute whose
value
+ * is either <code>null</code> or a <code>DocumentType</code> object. The
+ * <code>DocumentType</code> interface in the DOM Core provides an interface
+ * to the list of entities that are defined for the document, and little
+ * else because the effect of namespaces and the various XML schema efforts
+ * on DTD representation are not clearly understood as of this writing.
+ * <p>The DOM Level 2 doesn't support editing <code>DocumentType</code>
nodes.
+ * <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 DocumentType extends Node {
/**
- * The name of DTD; i.e., the name immediately following the
+ * The name of DTD; i.e., the name immediately following the
* <code>DOCTYPE</code> keyword.
*/
public String getName();
/**
- * A <code>NamedNodeMap</code> containing the general entities, both
- * external and internal, declared in the DTD. Parameter entities are
not
- * contained. Duplicates are discarded. For example in:
- * <pre>
- * <!DOCTYPE ex SYSTEM "ex.dtd" [
- * <!ENTITY foo "foo">
- * <!ENTITY bar "bar">
- * <!ENTITY bar "bar2">
- * <!ENTITY % baz "baz">
- * ]>
- * <ex/></pre>
- * the interface
- * provides access to <code>foo</code> and the first declaration of
- * <code>bar</code> but not the second declaration of <code>bar</code>
- * or <code>baz</code> . Every node in this map also implements the
- * <code>Entity</code> interface.
- * <br> The DOM Level 2 does not support editing entities, therefore
+ * A <code>NamedNodeMap</code> containing the general entities, both
+ * external and internal, declared in the DTD. Parameter entities are
+ * not contained. Duplicates are discarded. For example in:
+ * <pre><!DOCTYPE
+ * ex SYSTEM "ex.dtd" [ <!ENTITY foo "foo"> <!ENTITY bar
+ * "bar"> <!ENTITY bar "bar2"> <!ENTITY % baz "baz">
+ * ]> <ex/></pre>
+ * the interface provides access to <code>foo</code>
+ * and the first declaration of <code>bar</code> but not the second
+ * declaration of <code>bar</code> or <code>baz</code>. Every node in
+ * this map also implements the <code>Entity</code> interface.
+ * <br>The DOM Level 2 does not support editing entities, therefore
* <code>entities</code> cannot be altered in any way.
*/
public NamedNodeMap getEntities();
/**
- * A <code>NamedNodeMap</code> containing the notations declared in
the
+ * A <code>NamedNodeMap</code> containing the notations declared in the
* DTD. Duplicates are discarded. Every node in this map also implements
* the <code>Notation</code> interface.
- * <br> The DOM Level 2 does not support editing notations, therefore
+ * <br>The DOM Level 2 does not support editing notations, therefore
* <code>notations</code> cannot be altered in any way.
*/
public NamedNodeMap getNotations();
/**
- * The public identifier of the external subset.
+ * The public identifier of the external subset.
* @since DOM Level 2
*/
public String getPublicId();
/**
- * The system identifier of the external subset.
+ * The system identifier of the external subset.
* @since DOM Level 2
*/
public String getSystemId();
/**
- * The internal subset as a string.
+ * 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.
* @since DOM Level 2
*/
public String getInternalSubset();
}
-
1.2 +145 -150 xml-xalan/java/src/org/w3c/dom/Element.java
Index: Element.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/Element.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Element.java 2000/10/02 02:43:14 1.1
+++ Element.java 2000/11/15 19:41:06 1.2
@@ -6,16 +6,16 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom;
/**
- * The <code>Element</code> interface represents an element in an HTML or
XML
+ * The <code>Element</code> interface represents an element in an HTML or
XML
* document. Elements may have attributes associated with them; since the
- * <code>Element</code> interface inherits from <code>Node</code> , the
+ * <code>Element</code> interface inherits from <code>Node</code>, the
* generic <code>Node</code> interface attribute <code>attributes</code> may
* be used to retrieve the set of all attributes for an element. There are
* methods on the <code>Element</code> interface to retrieve either an
@@ -24,182 +24,178 @@
* <code>Attr</code> object should be retrieved to examine the possibly
* fairly complex sub-tree representing the attribute value. On the other
* hand, in HTML, where all attributes have simple string values, methods to
- * directly access an attribute value can safely be used as a convenience.
In
+ * directly access an attribute value can safely be used as a convenience.In
* DOM Level 2, the method <code>normalize</code> is inherited from the
* <code>Node</code> interface where it was moved.
+ * <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 Element extends Node {
/**
- * The name of the element. For example, in:
- * <pre>
- * <elementExample id="demo">
- * ...
- * </elementExample> ,</pre>
+ * The name of the element. For example, in:
+ * <pre> <elementExample
+ * id="demo"> ... </elementExample> , </pre>
* <code>tagName</code> has
- * the value <code>"elementExample"</code> . Note that this is
+ * the value <code>"elementExample"</code>. Note that this is
* 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
+ * canonical uppercase form, regardless of the case in the source HTML
* document.
*/
public String getTagName();
/**
- * Retrieves an attribute value by name.
- * @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.
+ * Retrieves an attribute value by name.
+ * @param nameThe 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.
*/
public String getAttribute(String name);
/**
- * Adds a new attribute. If an attribute with that name is already
- * present in the element, its value is changed to be that of the value
+ * Adds a new attribute. If an attribute with that name is already
present
+ * in the element, its value is changed to be that of the value
* parameter. This value is a simple string; it is not parsed as it is
- * being set. So any markup (such as syntax to be recognized as an
entity
- * reference) is treated as literal text, and needs to be appropriately
- * escaped by the implementation when it is written out. In order to
- * assign an attribute value that contains entity references, the user
- * must create an <code>Attr</code> node plus any <code>Text</code> and
- * <code>EntityReference</code> nodes, build the appropriate subtree,
and
- * use <code>setAttributeNode</code> to assign it as the value of an
- * attribute.
- * <br> To set an attribute with a qualified name and namespace URI, use
+ * being set. So any markup (such as syntax to be recognized as an
+ * entity reference) is treated as literal text, and needs to be
+ * appropriately escaped by the implementation when it is written out.
+ * In order to assign an attribute value that contains entity
+ * references, the user must create an <code>Attr</code> node plus any
+ * <code>Text</code> and <code>EntityReference</code> nodes, build the
+ * appropriate subtree, and use <code>setAttributeNode</code> to assign
+ * 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 name The name of the attribute to create or alter.
- * @param value Value to set in string form.
+ * @param nameThe name of the attribute to create or alter.
+ * @param valueValue to set in string form.
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified name contains an
+ * INVALID_CHARACTER_ERR: Raised if the specified name contains an
* illegal character.
- * <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
+ * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
public void setAttribute(String name,
String value)
throws DOMException;
/**
- * Removes an attribute by name. If the removed attribute is known to
- * have a default value, an attribute immediately appears containing the
+ * Removes an attribute by name. If the removed attribute is known to
have
+ * a default value, an attribute immediately appears containing the
* default value as well as the corresponding namespace URI, local name,
* and prefix when applicable.
- * <br> To remove an attribute by local name and namespace URI, use the
+ * <br>To remove an attribute by local name and namespace URI, use the
* <code>removeAttributeNS</code> method.
- * @param name The name of the attribute to remove.
+ * @param nameThe name of the attribute to remove.
* @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
+ * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
public void removeAttribute(String name)
throws DOMException;
/**
- * Retrieves an attribute node by name.
- * <br> To retrieve an attribute node by qualified name and namespace
URI,
+ * 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 name The name (<code>nodeName</code> ) of the attribute to
+ * @param nameThe 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
+ * @return The <code>Attr</code> node with the specified name (
+ * <code>nodeName</code>) or <code>null</code> if there is no such
* attribute.
*/
public Attr getAttributeNode(String name);
/**
- * Adds a new attribute node. If an attribute with that name (
- * <code>nodeName</code> ) is already present in the element, it is
+ * Adds a new attribute node. If an attribute with that name (
+ * <code>nodeName</code>) is already present in the element, it is
* replaced by the new one.
- * <br> To add a new attribute node with a qualified name and namespace
+ * <br>To add a new attribute node with a qualified name and namespace
* URI, use the <code>setAttributeNodeNS</code> method.
- * @param newAttr The <code>Attr</code> node to add to the attribute
list.
- * @return If the <code>newAttr</code> attribute replaces an existing
+ * @param newAttrThe <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.
* @exception DOMException
- * WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created
from
- * a different document than the one that created the element.
- * <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- * <br> INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> 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.
+ * WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created from
a
+ * different document than the one that created the element.
+ * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
+ * <br>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> 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.
*/
public Attr setAttributeNode(Attr newAttr)
throws DOMException;
/**
- * Removes the specified attribute node. If the removed
<code>Attr</code>
+ * Removes the specified attribute node. If the removed
<code>Attr</code>
* 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 oldAttr The <code>Attr</code> node to remove from the
attribute
+ * @param oldAttrThe <code>Attr</code> node to remove from the attribute
* list.
- * @return The <code>Attr</code> node that was removed.
+ * @return The <code>Attr</code> node that was removed.
* @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- * <br> NOT_FOUND_ERR: Raised if <code>oldAttr</code> is not an
- * attribute of the element.
+ * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
+ * <br>NOT_FOUND_ERR: Raised if <code>oldAttr</code> is not an
attribute
+ * of the element.
*/
public Attr removeAttributeNode(Attr oldAttr)
throws DOMException;
/**
- * Returns a <code>NodeList</code> of all descendant elements with a
- * given tag name, in the order in which they would be encountered in a
- * preorder traversal of the <code>Element</code> tree.
- * @param name The name of the tag to match on. The special value "*"
+ * 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 "*"
* matches all tags.
- * @return A list of matching <code>Element</code> nodes.
+ * @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 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 an
- * <code>null</code> if that attribute does not have a specified or
- * default value. This is different from <code>getAttribute</code>
- * which never return <code>null</code> .
+ * 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.
+ * @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
*/
public String getAttributeNS(String namespaceURI,
String localName);
/**
- * Adds a new attribute. If an attribute with the same local name and
- * namespace URI is already present on the element, its prefix is
changed
- * to be the prefix part of the <code>qualifiedName</code> , and its
- * value is changed to be the <code>value</code> parameter. This value
is
- * a simple string; it is not parsed as it is being set. So any markup
- * (such as syntax to be recognized as an entity reference) is treated
as
- * literal text, and needs to be appropriately escaped by the
- * implementation when it is written out. In order to assign an
attribute
- * value that contains entity references, the user must create an
- * <code>Attr</code> node plus any <code>Text</code> and
- * <code>EntityReference</code> nodes, build the appropriate subtree,
and
- * use <code>setAttributeNodeNS</code> or <code>setAttributeNode</code>
to
- * assign it as the value of an attribute.
- * <br> HTML-only DOM implementations do not need to implement this
method.
- * @param namespaceURI The namespace URI of the attribute to create or
+ * Adds a new attribute. If an attribute with the same local name and
+ * namespace URI is already present on the element, its prefix is
+ * changed to be the prefix part of the <code>qualifiedName</code>, and
+ * its value is changed to be the <code>value</code> parameter. This
+ * value is a simple string; it is not parsed as it is being set. So any
+ * markup (such as syntax to be recognized as an entity reference) is
+ * treated as literal text, and needs to be appropriately escaped by the
+ * implementation when it is written out. In order to assign an
+ * attribute value that contains entity references, the user must create
+ * an <code>Attr</code> node plus any <code>Text</code> and
+ * <code>EntityReference</code> nodes, build the appropriate subtree,
+ * 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
* alter.
- * @param qualifiedName The qualified name of the attribute to create
or
+ * @param qualifiedNameThe qualified name of the attribute to create or
* alter.
- * @param value The value to set in string form.
+ * @param valueThe value to set in string form.
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified qualified name
+ * INVALID_CHARACTER_ERR: Raised if the specified qualified name
* contains an illegal character.
- * <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- * <br> NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
+ * <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
- * <code>namespaceURI</code> is <code>null</code> or an empty string,
- * 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", if the
- * <code>qualifiedName</code> has a prefix that is "xmlns" and the
- * <code>namespaceURI</code> is different from
- * "http://www.w3.org/2000/xmlns/", or if the
<code>qualifiedName</code>
- * is "xmlns" and the <code>namespaceURI</code> is different from
- * "http://www.w3.org/2000/xmlns/".
+ * <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>namespaceURI</code> is different from "
+ * http://www.w3.org/2000/xmlns/".
* @since DOM Level 2
*/
public void setAttributeNS(String namespaceURI,
@@ -208,15 +204,15 @@
throws DOMException;
/**
- * Removes an attribute by local name and namespace URI. If the removed
+ * Removes an attribute by local name and namespace URI. If the removed
* 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 namespaceURI The namespace URI of the attribute to remove.
- * @param localName The local name of the attribute to remove.
+ * 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.
* @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
+ * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
* @since DOM Level 2
*/
public void removeAttributeNS(String namespaceURI,
@@ -224,11 +220,11 @@
throws DOMException;
/**
- * Retrieves an <code>Attr</code> node by local name and namespace URI.
+ * Retrieves an <code>Attr</code> node by local name and namespace URI.
* HTML-only DOM implementations do not need to implement this method.
- * @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
+ * @param namespaceURIThe namespace URI of the attribute to retrieve.
+ * @param localNameThe 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.
* @since DOM Level 2
@@ -237,71 +233,70 @@
String localName);
/**
- * Adds a new attribute. If an attribute with that local name and that
- * namespace URI is already present in the element, it is replaced by
the
- * new one.
- * <br> HTML-only DOM implementations do not need to implement this
method.
- * @param newAttr The <code>Attr</code> node to add to the attribute
list.
- * @return If the <code>newAttr</code> attribute replaces an existing
- * attribute with the same local name and namespace URI , the
- * replaced <code>Attr</code> node is returned, otherwise
- * <code>null</code> is returned.
+ * 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.
+ * @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
+ * returned.
* @exception DOMException
- * WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created
from
- * a different document than the one that created the element.
- * <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- * <br> INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> 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.
+ * WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created from
a
+ * different document than the one that created the element.
+ * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
+ * <br>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> 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.
* @since DOM Level 2
*/
public Attr setAttributeNodeNS(Attr newAttr)
throws DOMException;
/**
- * 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 would
- * be encountered in a preorder traversal of the <code>Document</code>
- * tree, starting from this node.
- * <br> HTML-only DOM implementations do not need to implement this
method.
- * @param namespaceURI The namespace URI of the elements to match on.
- * The special value "*" matches all namespaces.
- * @param localName The local name of the elements to match on. The
+ * Returns a <code>NodeList</code> of all the descendant
+ * <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
+ * special value "*" matches all namespaces.
+ * @param localNameThe 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> .
+ * @return A new <code>NodeList</code> object containing all the matched
+ * <code>Elements</code>.
* @since DOM Level 2
*/
public NodeList getElementsByTagNameNS(String namespaceURI,
String localName);
/**
- * Returns <code>true</code> when an attribute with a given name is
+ * 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 name The name of the attribute to look for.
+ * @param nameThe 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.
+ * specified on this element or has a default value, <code>false</code>
+ * otherwise.
* @since DOM Level 2
*/
public boolean hasAttribute(String name);
/**
- * 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,
+ * 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 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.
+ * @param namespaceURIThe namespace URI of the attribute to look for.
+ * @param localNameThe 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.
* @since DOM Level 2
*/
public boolean hasAttributeNS(String namespaceURI,
String localName);
}
-
1.2 +24 -24 xml-xalan/java/src/org/w3c/dom/Entity.java
Index: Entity.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/Entity.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Entity.java 2000/10/02 02:43:14 1.1
+++ Entity.java 2000/11/15 19:41:06 1.2
@@ -6,63 +6,63 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom;
/**
- * This interface represents an entity, either parsed or unparsed, in an
XML
- * document. Note that this models the entity itself not the entity
+ * This interface represents an entity, either parsed or unparsed, in an XML
+ * document. Note that this models the entity itself not the entity
* declaration. <code>Entity</code> declaration modeling has been left for a
* later Level of the DOM specification.
- * <p> The <code>nodeName</code> attribute that is inherited from
+ * <p>The <code>nodeName</code> attribute that is inherited from
* <code>Node</code> contains the name of the entity.
- * <p> An XML processor may choose to completely expand entities before the
+ * <p>An XML processor may choose to completely expand entities before the
* structure model is passed to the DOM; in this case there will be no
* <code>EntityReference</code> nodes in the document tree.
- * <p> XML does not mandate that a non-validating XML processor read and
+ * <p>XML does not mandate that a non-validating XML processor read and
* process entity declarations made in the external subset or declared in
* external parameter entities. This means that parsed entities declared in
* the external subset need not be expanded by some classes of applications,
- * and that the replacement value of the entity may not be available. When
the
- * replacement value is available, the corresponding <code>Entity</code>
+ * and that the replacement value of the entity may not be available. When
+ * the replacement value is available, the corresponding <code>Entity</code>
* node's child list represents the structure of that replacement text.
* Otherwise, the child list is empty.
- * <p> The DOM Level 2 does not support editing <code>Entity</code> nodes;
if
- * a user wants to make changes to the contents of an <code>Entity</code> ,
+ * <p>The DOM Level 2 does not support editing <code>Entity</code> nodes; if
a
+ * user wants to make changes to the contents of an <code>Entity</code>,
* every related <code>EntityReference</code> node has to be replaced in the
- * structure model by a clone of the <code>Entity</code> 's contents, and
- * then the desired changes must be made to each of those clones instead.
All
- * the descendants of an <code>Entity</code> node are readonly.
- * <p> An <code>Entity</code> node does not have any parent. If the entity
- * contains an unbound namespace prefix , the <code>namespaceURI</code> of
+ * structure model by a clone of the <code>Entity</code>'s contents, and
+ * then the desired changes must be made to each of those clones instead.
+ * <code>Entity</code> nodes and all their descendants are readonly.
+ * <p>An <code>Entity</code> node does not have any parent.If the entity
+ * contains an unbound namespace prefix, the <code>namespaceURI</code> of
* the corresponding node in the <code>Entity</code> node subtree is
- * <code>null</code> . The same is true for <code>EntityReference</code>
+ * <code>null</code>. The same is true for <code>EntityReference</code>
* nodes that refer to this entity, when they are created using the
* <code>createEntityReference</code> method of the <code>Document</code>
* interface. The DOM Level 2 does not support any mechanism to resolve
* namespace prefixes.
+ * <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 Entity extends Node {
/**
- * The public identifier associated with the entity, if specified. If
the
- * public identifier was not specified, this is <code>null</code> .
+ * The public identifier associated with the entity, if specified. If
the
+ * public identifier was not specified, this is <code>null</code>.
*/
public String getPublicId();
/**
- * The system identifier associated with the entity, if specified. If
the
- * system identifier was not specified, this is <code>null</code> .
+ * The system identifier associated with the entity, if specified. If
the
+ * system identifier was not specified, this is <code>null</code>.
*/
public String getSystemId();
/**
- * For unparsed entities, the name of the notation for the entity. For
- * parsed entities, this is <code>null</code> .
+ * For unparsed entities, the name of the notation for the entity. For
+ * parsed entities, this is <code>null</code>.
*/
public String getNotationName();
}
-
1.2 +20 -19 xml-xalan/java/src/org/w3c/dom/EntityReference.java
Index: EntityReference.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/EntityReference.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- EntityReference.java 2000/10/02 02:43:14 1.1
+++ EntityReference.java 2000/11/15 19:41:06 1.2
@@ -6,33 +6,34 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom;
/**
* <code>EntityReference</code> objects may be inserted into the structure
- * model when an entity reference is in the source document, or when the
user
- * wishes to insert an entity reference. Note that character references and
- * references to predefined entities are considered to be expanded by the
- * HTML or XML processor so that characters are represented by their Unicode
- * equivalent rather than by an entity reference. Moreover, the XML
processor
- * may completely expand references to entities while building the structure
- * model, instead of providing <code>EntityReference</code> objects. If it
- * does provide such objects, then for a given <code>EntityReference</code>
- * node, it may be that there is no <code>Entity</code> node representing
the
- * referenced entity. If such an <code>Entity</code> exists, then the child
- * list of the <code>EntityReference</code> node is in general the same as
- * that of the <code>Entity</code> node. They may differ when an entity
- * contains an unbound namespace prefix . In such a case, because the
+ * model when an entity reference is in the source document, or when the
+ * user wishes to insert an entity reference. Note that character references
+ * and references to predefined entities are considered to be expanded by
+ * the HTML or XML processor so that characters are represented by their
+ * Unicode equivalent rather than by an entity reference. Moreover, the XML
+ * processor may completely expand references to entities while building the
+ * structure model, instead of providing <code>EntityReference</code>
+ * objects. If it does provide such objects, then for a given
+ * <code>EntityReference</code> node, it may be that there is no
+ * <code>Entity</code> node representing the referenced entity. If such an
+ * <code>Entity</code> exists, then the subtree of the
+ * <code>EntityReference</code> node is in general a copy of the
+ * <code>Entity</code> node subtree. However, this may not be true when an
+ * entity contains an unbound namespace prefix. In such a case, because the
* namespace prefix resolution depends on where the entity reference is, the
* descendants of the <code>EntityReference</code> node may be bound to
- * different namespace URIs .
- * <p> As with the <code>Entity</code> node, all descendants of the
- * <code>EntityReference</code> are readonly.
+ * different namespace URIs.
+ * <p>As for <code>Entity</code> nodes, <code>EntityReference</code> nodes
and
+ * all their descendants are readonly.
+ * <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 EntityReference extends Node {
}
-
1.2 +55 -55 xml-xalan/java/src/org/w3c/dom/NamedNodeMap.java
Index: NamedNodeMap.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/NamedNodeMap.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- NamedNodeMap.java 2000/10/02 02:43:14 1.1
+++ NamedNodeMap.java 2000/11/15 19:41:06 1.2
@@ -6,51 +6,53 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom;
/**
- * Objects implementing the <code>NamedNodeMap</code> interface are used to
+ * Objects implementing the <code>NamedNodeMap</code> interface are used to
* represent collections of nodes that can be accessed by name. Note that
- * <code>NamedNodeMap</code> does not inherit from <code>NodeList</code> ;
+ * <code>NamedNodeMap</code> does not inherit from <code>NodeList</code>;
* <code>NamedNodeMaps</code> are not maintained in any particular order.
* Objects contained in an object implementing <code>NamedNodeMap</code> may
* also be accessed by an ordinal index, but this is simply to allow
- * convenient enumeration of the contents of a <code>NamedNodeMap</code> ,
+ * convenient enumeration of the contents of a <code>NamedNodeMap</code>,
* and does not imply that the DOM specifies an order to these Nodes.
+ * <p><code>NamedNodeMap</code> objects in the DOM are live.
+ * <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 NamedNodeMap {
/**
- * Retrieves a node specified by name.
- * @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
+ * Retrieves a node specified by name.
+ * @param nameThe <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.
*/
public Node getNamedItem(String name);
/**
- * Adds a node using its <code>nodeName</code> attribute. If a node
with
+ * Adds a node using its <code>nodeName</code> attribute. If a node with
* that name is already present in this map, it is replaced by the new
* one.
- * <br> As the <code>nodeName</code> attribute is used to derive the
name
+ * <br>As the <code>nodeName</code> attribute is used to derive the name
* which the node must be stored under, multiple nodes of certain types
* (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 arg A node to store in this map. The node will later be
+ * @param argA 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
+ * @return If the new <code>Node</code> replaces an existing node the
* replaced <code>Node</code> is returned, otherwise <code>null</code>
* is returned.
* @exception DOMException
- * WRONG_DOCUMENT_ERR: Raised if <code>arg</code> was created from a
+ * WRONG_DOCUMENT_ERR: Raised if <code>arg</code> was created from a
* different document than the one that created this map.
- * <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
- * <br> INUSE_ATTRIBUTE_ERR: Raised if <code>arg</code> is an
+ * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
+ * <br>INUSE_ATTRIBUTE_ERR: Raised if <code>arg</code> is an
* <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.
@@ -59,69 +61,68 @@
throws DOMException;
/**
- * Removes a node specified by name. A removed attribute may be known
to
- * have a default value when this map contains the attributes attached
to
- * an element, as returned by the attributes 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.
- * @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
+ * Removes a node specified by name. When this map contains the
attributes
+ * attached to an element, if the removed attribute is known to have a
+ * 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.
+ * @return The node removed from this map if a node with such a name
* exists.
* @exception DOMException
- * NOT_FOUND_ERR: Raised if there is no node named <code>name</code>
- * in this map.
- * <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
+ * NOT_FOUND_ERR: Raised if there is no node named <code>name</code>
in
+ * this map.
+ * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
*/
public Node removeNamedItem(String name)
throws DOMException;
/**
- * 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 index Index into this map.
- * @return The node at the <code>index</code> th position in the map,
or
+ * 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.
+ * @return The node at the <code>index</code>th position in the map, or
* <code>null</code> if that is not a valid index.
*/
public Node item(int index);
/**
- * The number of nodes in this map. The range of valid child node
indices
+ * The number of nodes in this map. The range of valid child node
indices
* 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
+ * Retrieves a node specified by local name and namespace URI. HTML-only
* DOM implementations do not need to implement this method.
- * @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.
+ * @param namespaceURIThe namespace URI of the node to retrieve.
+ * @param localNameThe 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.
* @since DOM Level 2
*/
public Node getNamedItemNS(String namespaceURI,
String localName);
/**
- * Adds a node using its <code>namespaceURI</code> and
- * <code>localName</code> . If a node with that namespace URI and that
+ * Adds a node using its <code>namespaceURI</code> and
+ * <code>localName</code>. If a node with that namespace URI and that
* local name is already present in this map, it is replaced by the new
* one.
- * <br> HTML-only DOM implementations do not need to implement this
method.
- * @param arg A node to store in this map. The node will later be
+ * <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
* 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
+ * @return If the new <code>Node</code> replaces an existing node the
* replaced <code>Node</code> is returned, otherwise <code>null</code>
* is returned.
* @exception DOMException
- * WRONG_DOCUMENT_ERR: Raised if <code>arg</code> was created from a
+ * WRONG_DOCUMENT_ERR: Raised if <code>arg</code> was created from a
* different document than the one that created this map.
- * <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
- * <br> INUSE_ATTRIBUTE_ERR: Raised if <code>arg</code> is an
+ * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
+ * <br>INUSE_ATTRIBUTE_ERR: Raised if <code>arg</code> is an
* <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.
@@ -131,21 +132,21 @@
throws DOMException;
/**
- * Removes a node specified by local name and namespace URI. A removed
+ * Removes a node specified by local name and namespace URI. A removed
* attribute may be known to have a default value when this map contains
* the attributes attached to an element, as returned by the attributes
* 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 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
+ * <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.
+ * @return The node removed from this map if a node with such a local
* name and namespace URI exists.
* @exception DOMException
- * NOT_FOUND_ERR: Raised if there is no node with the specified
+ * NOT_FOUND_ERR: Raised if there is no node with the specified
* <code>namespaceURI</code> and <code>localName</code> in this map.
- * <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
+ * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly.
* @since DOM Level 2
*/
public Node removeNamedItemNS(String namespaceURI,
@@ -153,4 +154,3 @@
throws DOMException;
}
-
1.2 +206 -168 xml-xalan/java/src/org/w3c/dom/Node.java
Index: Node.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/Node.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Node.java 2000/10/02 02:43:15 1.1
+++ Node.java 2000/11/15 19:41:06 1.2
@@ -6,347 +6,385 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom;
/**
- * The <code>Node</code> interface is the primary datatype for the entire
+ * The <code>Node</code> interface is the primary datatype for the entire
* Document Object Model. It represents a single node in the document tree.
* While all objects implementing the <code>Node</code> interface expose
* methods for dealing with children, not all objects implementing the
* <code>Node</code> interface may have children. For example,
- * <code>Text</code> nodes may not have children, and adding children to
such
- * nodes results in a <code>DOMException</code> being raised.
- * <p> The attributes <code>nodeName</code> , <code>nodeValue</code> and
+ * <code>Text</code> nodes may not have children, and adding children to
+ * such nodes results in a <code>DOMException</code> being raised.
+ * <p>The attributes <code>nodeName</code>, <code>nodeValue</code> and
* <code>attributes</code> are included as a mechanism to get at node
* information without casting down to the specific derived interface. In
- * cases where there is no obvious mapping of these attributes for a
specific
- * <code>nodeType</code> (e.g., <code>nodeValue</code> for an
- * <code>Element</code> or <code>attributes</code> for a
<code>Comment</code>
- * ), this returns <code>null</code> . Note that the specialized interfaces
+ * cases where there is no obvious mapping of these attributes for a
+ * specific <code>nodeType</code> (e.g., <code>nodeValue</code> for an
+ * <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.
+ * <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 {
// NodeType
+ /**
+ * The node is an <code>Element</code>.
+ */
public static final short ELEMENT_NODE = 1;
+ /**
+ * The node is an <code>Attr</code>.
+ */
public static final short ATTRIBUTE_NODE = 2;
+ /**
+ * The node is a <code>Text</code> node.
+ */
public static final short TEXT_NODE = 3;
+ /**
+ * The node is a <code>CDATASection</code>.
+ */
public static final short CDATA_SECTION_NODE = 4;
+ /**
+ * The node is an <code>EntityReference</code>.
+ */
public static final short ENTITY_REFERENCE_NODE = 5;
+ /**
+ * The node is an <code>Entity</code>.
+ */
public static final short ENTITY_NODE = 6;
+ /**
+ * The node is a <code>ProcessingInstruction</code>.
+ */
public static final short PROCESSING_INSTRUCTION_NODE = 7;
+ /**
+ * The node is a <code>Comment</code>.
+ */
public static final short COMMENT_NODE = 8;
+ /**
+ * The node is a <code>Document</code>.
+ */
public static final short DOCUMENT_NODE = 9;
+ /**
+ * The node is a <code>DocumentType</code>.
+ */
public static final short DOCUMENT_TYPE_NODE = 10;
+ /**
+ * The node is a <code>DocumentFragment</code>.
+ */
public static final short DOCUMENT_FRAGMENT_NODE = 11;
+ /**
+ * The node is a <code>Notation</code>.
+ */
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();
/**
- * 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.
+ * 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.
+ * 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
+ * DOMSTRING_SIZE_ERR: Raised when it would return more characters
than
+ * fit in a <code>DOMString</code> variable on the implementation
* platform.
*/
public String getNodeValue()
- throws DOMException;
+ throws DOMException;
public void setNodeValue(String nodeValue)
- throws DOMException;
+ throws DOMException;
/**
- * A code representing the type of the underlying object, as defined
- * above.
+ * A code representing the type of the underlying object, as defined
above.
*/
public short getNodeType();
/**
- * The parent of this node. All nodes, except <code>Attr</code> ,
- * <code>Document</code> , <code>DocumentFragment</code> ,
- * <code>Entity</code> , and <code>Notation</code> may have a parent.
- * However, if a node has just been created and not yet added to the
+ * The parent of this node. All nodes, except <code>Attr</code>,
+ * <code>Document</code>, <code>DocumentFragment</code>,
+ * <code>Entity</code>, and <code>Notation</code> may have a parent.
+ * However, if a node has just been created and not yet added to the
* tree, or if it has been removed from the tree, this is
- * <code>null</code> .
+ * <code>null</code>.
*/
public Node getParentNode();
/**
- * A <code>NodeList</code> that contains all children of this node. If
+ * A <code>NodeList</code> that contains all children of this node. If
* there are no children, this is a <code>NodeList</code> containing no
- * nodes. The content of the returned <code>NodeList</code> is "live" in
- * the sense that, for instance, changes to the children of the node
- * object that it was created from are immediately reflected in
the nodes
- * returned by the <code>NodeList</code> accessors; it is not a static
- * snapshot of the content of the node. This is true for every
- * <code>NodeList</code> , including the ones returned by the
- * <code>getElementsByTagName</code> method.
+ * nodes.
*/
public NodeList getChildNodes();
/**
- * The first child of this node. If there is no such node, this returns
- * <code>null</code> .
+ * The first child of this node. If there is no such node, this returns
+ * <code>null</code>.
*/
public Node getFirstChild();
/**
- * The last child of this node. If there is no such node, this returns
- * <code>null</code> .
+ * The last child of this node. If there is no such node, this returns
+ * <code>null</code>.
*/
public Node getLastChild();
/**
- * The node immediately preceding this node. If there is no such node,
- * this returns <code>null</code> .
+ * The node immediately preceding this node. If there is no such node,
+ * this returns <code>null</code>.
*/
public Node getPreviousSibling();
/**
- * The node immediately following this node. If there is no such node,
- * this returns <code>null</code> .
+ * The node immediately following this node. If there is no such node,
+ * this returns <code>null</code>.
*/
public Node getNextSibling();
/**
- * A <code>NamedNodeMap</code> containing the attributes of this node
(if
- * it is an <code>Element</code> ) or <code>null</code> otherwise.
+ * A <code>NamedNodeMap</code> containing the attributes of this node
(if
+ * it is an <code>Element</code>) or <code>null</code> otherwise.
*/
public NamedNodeMap getAttributes();
/**
- * The <code>Document</code> object associated with this node. This is
+ * The <code>Document</code> object associated with this node. This is
* also the <code>Document</code> object used to create new nodes. When
* this node is a <code>Document</code> or a <code>DocumentType</code>
* which is not used with any <code>Document</code> yet, this is
- * <code>null</code> .
+ * <code>null</code>.
* @version DOM Level 2
*/
public Document getOwnerDocument();
/**
- * Inserts the node <code>newChild</code> before the existing child
node
- * <code>refChild</code> . If <code>refChild</code> is <code>null</code>
- * , insert <code>newChild</code> at the end of the list of children.
- * <br> If <code>newChild</code> is a <code>DocumentFragment</code>
- * object, all of its children are inserted, in the same order, before
- * <code>refChild</code> . If the <code>newChild</code> is already in
the
+ * Inserts the node <code>newChild</code> before the existing child node
+ * <code>refChild</code>. If <code>refChild</code> is <code>null</code>,
+ * insert <code>newChild</code> at the end of the list of children.
+ * <br>If <code>newChild</code> is a <code>DocumentFragment</code>
object,
+ * 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 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.
+ * @param newChildThe node to insert.
+ * @param refChildThe 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.
- * <br> WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was
created
+ * 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.
+ * <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 node
- * being inserted is readonly.
- * <br> NOT_FOUND_ERR: Raised if <code>refChild</code> is not a child
- * of this node.
+ * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or
+ * if the parent of the node being inserted is readonly.
+ * <br>NOT_FOUND_ERR: Raised if <code>refChild</code> is not a child
of
+ * this node.
*/
public Node insertBefore(Node newChild,
Node refChild)
throws DOMException;
/**
- * Replaces the child node <code>oldChild</code> with
- * <code>newChild</code> in the list of children, and returns the
- * <code>oldChild</code> node.
- * <br> If <code>newChild</code> is a <code>DocumentFragment</code>
object,
- * <code>oldChild</code> is replaced by all of the
- * <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 newChild The new node to put in the child list.
- * @param oldChild The node being replaced in the list.
- * @return The node replaced.
+ * Replaces the child node <code>oldChild</code> with
<code>newChild</code>
+ * in the list of children, and returns the <code>oldChild</code> node.
+ * <br>If <code>newChild</code> is a <code>DocumentFragment</code>
object,
+ * <code>oldChild</code> is replaced by all of the
+ * <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.
+ * @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.
- * <br> WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was
created
+ * 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.
+ * <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 new
- * node is readonly.
- * <br> NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child
- * of this node.
+ * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent
of
+ * the new node is readonly.
+ * <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child
of
+ * this node.
*/
public Node replaceChild(Node newChild,
Node oldChild)
throws DOMException;
/**
- * Removes the child node indicated by <code>oldChild</code> from the
- * list of children, and returns it.
- * @param oldChild The node being removed.
- * @return The node removed.
+ * Removes the child node indicated by <code>oldChild</code> from the
list
+ * of children, and returns it.
+ * @param oldChildThe node being removed.
+ * @return The node removed.
* @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- * <br> NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child
- * of this node.
+ * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
+ * <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child
of
+ * this node.
*/
public Node removeChild(Node oldChild)
throws DOMException;
/**
- * Adds the node <code>newChild</code> to the end of the list of
children
+ * 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 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.
+ * @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
+ * @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.
- * <br> WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was
created
+ * 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.
+ * <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 node
- * being appended is readonly.
+ * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
public Node appendChild(Node newChild)
throws DOMException;
/**
- * This is a convenience method to allow easy determination of whether
a
- * node has any children.
- * @return <code>true</code> if the node has any children,
- * <code>false</code> if the node has no children.
+ * Returns whether this node has any children.
+ * @return <code>true</code> if this node has any children,
+ * <code>false</code> otherwise.
*/
public boolean hasChildNodes();
/**
- * Returns a duplicate of this node, i.e., serves as a generic copy
+ * Returns a duplicate of this node, i.e., serves as a generic copy
* constructor for nodes. The duplicate node has no parent; (
- * <code>parentNode</code> returns <code>null</code> .).
- * <br> Cloning an <code>Element</code> copies all attributes and their
+ * <code>parentNode</code> is <code>null</code>.).
+ * <br>Cloning an <code>Element</code> copies all attributes and their
* values, including those generated by the XML processor to represent
* defaulted attributes, but this method does not copy any text it
* contains unless it is a deep clone, since the text is contained in a
- * child <code>Text</code> node. Cloning any other type of node simply
- * returns a copy of this node.
- * <br> Note that cloning an immutable subtree results in a mutable
copy,
- * but the children of an <code>EntityReference</code> clone are
readonly.
- * @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> ).
- * @return The duplicate node.
+ * child <code>Text</code> node. Cloning an <code>Attribute</code>
+ * directly, as opposed to be cloned as part of an <code>Element</code>
+ * cloning operation, returns a specified attribute (
+ * <code>specified</code> is <code>true</code>). Cloning any other type
+ * of node simply returns a copy of this node.
+ * <br>Note that cloning an immutable subtree results in a mutable copy,
+ * but the children of an <code>EntityReference</code> clone are readonly
+ * . In addition, clones of unspecified <code>Attr</code> nodes are
+ * 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
+ * the specified node; if <code>false</code>, clone only the node
+ * itself (and its attributes, if it is an <code>Element</code>).
+ * @return The duplicate node.
*/
public Node cloneNode(boolean deep);
/**
- * Puts all <code>Text</code> nodes in the full depth of the sub-tree
- * underneath this <code>Node</code> , including attribute nodes, into a
- * "normal" form where only markup (e.g., tags, comments, processing
- * instructions, CDATA sections, and entity references) separates
- * <code>Text</code> nodes, i.e., there are neither adjacent
- * <code>Text</code> nodes nor empty <code>Text</code> nodes. This can
be
- * used to ensure that the DOM view of a document is the same as if it
- * were saved and re-loaded, and is useful when operations (such as
- * XPointer lookups) that depend on a particular document tree structure
- * are to be used. In cases where the document contains
- * <code>CDATASections</code> , the normalize operation alone may not be
+ * Puts all <code>Text</code> nodes in the full depth of the sub-tree
+ * underneath this <code>Node</code>, including attribute nodes, into a
+ * "normal" form where only structure (e.g., elements, comments,
+ * processing instructions, CDATA sections, and entity references)
+ * separates <code>Text</code> nodes, i.e., there are neither adjacent
+ * <code>Text</code> nodes nor empty <code>Text</code> nodes. This can
+ * be used to ensure that the DOM view of a document is the same as if
+ * it were saved and re-loaded, and is useful when operations (such as
+ * XPointer lookups) that depend on a particular document tree
+ * structure are to be used.In cases where the document contains
+ * <code>CDATASections</code>, the normalize operation alone may not be
* sufficient, since XPointers do not differentiate between
* <code>Text</code> nodes and <code>CDATASection</code> nodes.
- * @since DOM Level 2
+ * @version DOM Level 2
*/
public void normalize();
/**
- * Tests whether the DOM implementation implements a specific feature
and
+ * Tests whether the DOM implementation implements a specific feature
and
* that feature is supported by this node.
- * @param feature The name of the feature to test. This is the same
name
+ * @param featureThe 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 version This is the version number of the feature to test. In
+ * <code>DOMImplementation</code>.
+ * @param versionThis 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> .
- * @return Returns <code>true</code> if the specified feature is
supported
- * on this node, <code>false</code> otherwise.
+ * method to return <code>true</code>.
+ * @return Returns <code>true</code> if the specified feature is
+ * supported on this node, <code>false</code> otherwise.
* @since DOM Level 2
*/
- public boolean supports(String feature,
- String version);
+ public boolean isSupported(String feature,
+ String version);
/**
- * The namespace URI of this node, or <code>null</code> if it is
+ * The namespace URI of this node, or <code>null</code> if it is
* unspecified.
- * <br> This is not a computed value that is the result of a namespace
- * lookup based on an examination of the namespace declarations in
scope.
- * It is merely the namespace URI given at creation time.
- * <br> For nodes of any type other than <code>ELEMENT_NODE</code> and
+ * <br>This is not a computed value that is the result of a namespace
+ * lookup based on an examination of the namespace declarations in
+ * scope. It is merely the namespace URI given at creation time.
+ * <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> .
- * Per the Namespaces in XML Specification an attribute does not
- * inherit its namespace from the element it is attached to. If an
- * attribute is not explicitly given a namespace, it simply has no
- * namespace.
+ * <code>Document</code> interface, this is always <code>null</code>.Per
+ * the Namespaces in XML Specification an attribute does not inherit
+ * its namespace from the element it is attached to. If an attribute is
+ * not explicitly given a namespace, it simply has no namespace.
* @since DOM Level 2
*/
public String getNamespaceURI();
/**
- * The namespace prefix of this node, or <code>null</code> if it is
+ * 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
+ * <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
+ * <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
+ * INVALID_CHARACTER_ERR: Raised if the specified prefix contains an
* illegal character.
- * <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- * <br> NAMESPACE_ERR: Raised if the specified <code>prefix</code> is
+ * <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 "http://www.w3.org/2000/xmlns/", or
- * if this node is an attribute and the <code>qualifiedName</code> of
- * this node is "xmlns" .
+ * <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();
public void setPrefix(String prefix)
- throws DOMException;
+ throws DOMException;
/**
- * Returns the local part of the qualified name of this node.
- * <br> For nodes created with a DOM Level 1 method, such as
- * <code>createElement</code> from the <code>Document</code> interface,
- * it is <code>null</code> .
+ * Returns the local part of the qualified name of this node.
+ * <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>.
* @since DOM Level 2
*/
public String getLocalName();
/**
- * Returns whether this node (if it is an element) has any attributes.
+ * Returns whether this node (if it is an element) has any attributes.
* @return <code>true</code> if this node has any attributes,
* <code>false</code> otherwise.
* @since DOM Level 2
*/
public boolean hasAttributes();
-}
+}
1.2 +13 -13 xml-xalan/java/src/org/w3c/dom/NodeList.java
Index: NodeList.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/NodeList.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- NodeList.java 2000/10/02 02:43:15 1.1
+++ NodeList.java 2000/11/15 19:41:06 1.2
@@ -6,36 +6,36 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom;
/**
- * The <code>NodeList</code> interface provides the abstraction of an
ordered
+ * The <code>NodeList</code> interface provides the abstraction of an
ordered
* collection of nodes, without defining or constraining how this collection
- * is implemented.
- * <p> The items in the <code>NodeList</code> are accessible via an integral
- * index, starting from 0.
+ * is implemented. <code>NodeList</code> objects in the DOM are live.
+ * <p>The items in the <code>NodeList</code> are accessible via an integral
+ * index, starting from 0.
+ * <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 NodeList {
/**
- * Returns the <code>index</code> th item in the collection. If
+ * 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 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
+ * the list, this returns <code>null</code>.
+ * @param indexIndex 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.
*/
public Node item(int index);
/**
- * The number of nodes in the list. The range of valid child node
indices
+ * The number of nodes in the list. The range of valid child node
indices
* is 0 to <code>length-1</code> inclusive.
*/
public int getLength();
}
-
1.2 +13 -13 xml-xalan/java/src/org/w3c/dom/Notation.java
Index: Notation.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/Notation.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Notation.java 2000/10/02 02:43:15 1.1
+++ Notation.java 2000/11/15 19:41:06 1.2
@@ -6,35 +6,35 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom;
/**
- * This interface represents a notation declared in the DTD. A notation
- * either declares, by name, the format of an unparsed entity (see section
4.7
- * of the XML 1.0 specification), or is used for formal declaration of
+ * This interface represents a notation declared in the DTD. A notation
either
+ * declares, by name, the format of an unparsed entity (see section 4.7 of
+ * the XML 1.0 specification ), or is used for formal declaration of
* processing instruction targets (see section 2.6 of the XML 1.0
- * specification). The <code>nodeName</code> attribute inherited from
+ * specification ). The <code>nodeName</code> attribute inherited from
* <code>Node</code> is set to the declared name of the notation.
- * <p> The DOM Level 1 does not support editing <code>Notation</code> nodes;
+ * <p>The DOM Level 1 does not support editing <code>Notation</code> nodes;
* they are therefore readonly.
- * <p> A <code>Notation</code> node does not have any parent.
+ * <p>A <code>Notation</code> node does not have any parent.
+ * <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 Notation extends Node {
/**
- * The public identifier of this notation. If the public identifier
was
- * not specified, this is <code>null</code> .
+ * The public identifier of this notation. If the public identifier was
+ * not specified, this is <code>null</code>.
*/
public String getPublicId();
/**
- * The system identifier of this notation. If the system identifier
was
- * not specified, this is <code>null</code> .
+ * The system identifier of this notation. If the system identifier was
+ * not specified, this is <code>null</code>.
*/
public String getSystemId();
}
-
1.2 +8 -8 xml-xalan/java/src/org/w3c/dom/ProcessingInstruction.java
Index: ProcessingInstruction.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/w3c/dom/ProcessingInstruction.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ProcessingInstruction.java 2000/10/02 02:43:15 1.1
+++ ProcessingInstruction.java 2000/11/15 19:41:06 1.2
@@ -6,35 +6,35 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom;
/**
- * The <code>ProcessingInstruction</code> interface represents a
"processing
+ * The <code>ProcessingInstruction</code> interface represents a "processing
* instruction", used in XML as a way to keep processor-specific information
* in the text of the document.
+ * <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 ProcessingInstruction extends Node {
/**
- * The target of this processing instruction. XML defines this as being
+ * The target of this processing instruction. XML defines this as being
* the first token following the markup that begins the processing
* instruction.
*/
public String getTarget();
/**
- * The content of this processing instruction. This is from the first
non
+ * 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> .
+ * preceding the <code>?></code>.
* @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
+ * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
*/
public String getData();
public void setData(String data)
throws DOMException;
}
-
1.2 +28 -27 xml-xalan/java/src/org/w3c/dom/Text.java
Index: Text.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/Text.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Text.java 2000/10/02 02:43:15 1.1
+++ Text.java 2000/11/15 19:41:06 1.2
@@ -6,50 +6,51 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom;
/**
- * The <code>Text</code> interface inherits from <code>CharacterData</code>
- * and represents the textual content (termed character data in XML) of an
- * <code>Element</code> or <code>Attr</code> . If there is no markup inside
+ * The <code>Text</code> interface inherits from <code>CharacterData</code>
+ * and represents the textual content (termed character data in XML) of an
+ * <code>Element</code> or <code>Attr</code>. If there is no markup inside
* an element's content, the text is contained in a single object
- * implementing the <code>Text</code> interface that is the only child of
the
- * element. If there is markup, it is parsed into the information items
- * (elements, comments, etc.) and <code>Text</code> nodes that form the
- * list of children of the element.
- * <p> When a document is first made available via the DOM, there is only
one
- * <code>Text</code> node for each block of text. Users may create adjacent
- * <code>Text</code> nodes that represent the contents of a given element
+ * implementing the <code>Text</code> interface that is the only child of
+ * the element. If there is markup, it is parsed into the information items
+ * (elements, comments, etc.) and <code>Text</code> nodes that form the list
+ * of children of the element.
+ * <p>When a document is first made available via the DOM, there is only one
+ * <code>Text</code> node for each block of text. Users may create adjacent
+ * <code>Text</code> nodes that represent the contents of a given element
* without any intervening markup, but should be aware that there is no way
* to represent the separations between these nodes in XML or HTML, so they
* will not (in general) persist between DOM editing sessions. The
- * <code>normalize()</code> method on <code>Element</code> merges any such
+ * <code>normalize()</code> method on <code>Node</code> merges any such
* adjacent <code>Text</code> objects into a single node for each block of
* text.
+ * <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 Text extends CharacterData {
/**
- * Breaks this node into two nodes at the specified
<code>offset</code>
- * , keeping both in the tree as siblings. This node then only contains
- * all the content up to the <code>offset</code> point. A new node of
the
- * same type, which is inserted as the next sibling of this node,
- * contains all the content at and after the <code>offset</code> point.
- * When the <code>offset</code> is equal to the length of this node, the
- * new node has no data.
- * @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.
+ * Breaks this node into two nodes at the specified <code>offset</code>,
+ * keeping both in the tree as siblings. After being split, this node
+ * will contain all the content up to the <code>offset</code> point. A
+ * new node of the same type, which contains all the content at and
+ * after the <code>offset</code> point, is returned. If the original
+ * 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
+ * <code>0</code>.
+ * @return The new node, of the same type as this node.
* @exception DOMException
- * INDEX_SIZE_ERR: Raised if the specified offset is negative or
- * greater than the number of 16-bit units in <code>data</code> .
- * <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
+ * INDEX_SIZE_ERR: Raised if the specified offset is negative or
greater
+ * than the number of 16-bit units in <code>data</code>.
+ * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
public Text splitText(int offset)
throws DOMException;
}
-
1.3 +3 -3 xml-xalan/java/src/org/w3c/dom/range/DocumentRange.java
Index: DocumentRange.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/range/DocumentRange.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DocumentRange.java 2000/10/16 16:30:57 1.2
+++ DocumentRange.java 2000/11/15 19:41:07 1.3
@@ -13,13 +13,13 @@
package org.w3c.dom.range;
/**
- * This interface can be obtained from the object implementing the
- * <code>Document</code> interface using binding-specific casting methods.
* @since DOM Level 2
*/
public interface DocumentRange {
/**
- * @return The initial state of the range returned from this method
is
+ * This interface can be obtained from the object implementing the
+ * <code>Document</code> interface using binding-specific casting
methods.
+ * @return The initial state of the range returned from this method is
* such that both of its boundary-points are positioned at the
* beginning of the corresponding Document, before any content. The
* range returned can only be used to select content associated with
1.3 +1 -2 xml-xalan/java/src/org/w3c/dom/range/Range.java
Index: Range.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/range/Range.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Range.java 2000/10/16 16:30:57 1.2
+++ Range.java 2000/11/15 19:41:07 1.3
@@ -17,12 +17,11 @@
import org.w3c.dom.Node;
/**
- * A range in a document.
* @since DOM Level 2
*/
public interface Range {
/**
- * Node within which the range begins.
+ * Node within which the range begins
* @exception DOMException
* INVALID_STATE_ERR: Raised if <code>detach()</code> has already
been
* invoked on this object.
1.2 +51 -39
xml-xalan/java/src/org/w3c/dom/traversal/DocumentTraversal.java
Index: DocumentTraversal.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/w3c/dom/traversal/DocumentTraversal.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DocumentTraversal.java 2000/10/02 02:43:16 1.1
+++ DocumentTraversal.java 2000/11/15 19:41:08 1.2
@@ -6,67 +6,80 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom.traversal;
-import org.w3c.dom.DOMException;
import org.w3c.dom.Node;
+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).
+ * 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
*/
public interface DocumentTraversal {
/**
- * Create a new NodeIterator over the subtree rooted at the specified
- * node.
- * @param root The node which will be iterated together with its
- * children. The iterator is initially positioned just before this
- * node. The whatToShow flags and the filter, if any, are not
- * considered when setting this position.
- * @param whatToShow This flag specifies which node types may appear in
+ * 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 iterator for the set of possible values. These flags
- * can be combined using <code>OR</code> .
- * @param filter The Filter to be used with this TreeWalker, or null to
- * indicate no filter.
- * @param entityReferenceExpansion The value of this flag determines
+ * 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
+ * <code>TreeWalker</code>, or <code>null</code> to indicate no filter.
+ * @param entityReferenceExpansionThe value of this flag determines
* whether entity reference nodes are expanded.
- * @return The newly created <code>NodeIterator</code> .
+ * @return The newly created <code>NodeIterator</code>.
+ * @exception DOMException
+ * NOT_SUPPORTED_ERR: Raised if the specified <code>root</code> is
+ * <code>null</code>.
*/
public NodeIterator createNodeIterator(Node root,
int whatToShow,
NodeFilter filter,
- boolean entityReferenceExpansion);
+ boolean entityReferenceExpansion)
+ throws DOMException;
/**
- * Create a new TreeWalker over the subtree rooted at the specified
node.
- * @param root The node which will serve as the root for the
- * <code>TreeWalker</code> . The whatToShow flags and the NodeFilter
- * are not considered when setting this value; any node type will be
- * accepted as the root. The currentNode of the TreeWalker is
- * initialized to this node, whether or not it is visible. The root
- * functions as a stopping point for traversal methods that look
upward
- * in the document structure, such as parentNode and nextNode. The
root
- * must not be null.
- * @param whatToShow This flag specifies which node types may appear in
- * the logical view of the tree presented by the iterator. See the
- * description of TreeWalker for the set of possible values. These
- * flags can be combined using <code>OR</code> .
- * @param filter The Filter to be used with this TreeWalker, or null to
- * indicate no filter.
- * @param entityReferenceExpansion The value of this flag determines
- * whether entity reference nodes are expanded.
- * @return The newly created <code>TreeWalker</code> .
+ * 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
+ * <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
+ * <code>currentNode</code> of the <code>TreeWalker</code> is
+ * initialized to this node, whether or not it is visible. The
+ * <code>root</code> functions as a stopping point for traversal
+ * 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
+ * <code>TreeWalker</code>, or <code>null</code> to indicate no filter.
+ * @param entityReferenceExpansionIf 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>.
* @exception DOMException
- * Raises the exception NOT_SUPPORTED_ERR if the specified root node
is
- * null.
+ * NOT_SUPPORTED_ERR: Raised if the specified <code>root</code> is
+ * <code>null</code>.
*/
public TreeWalker createTreeWalker(Node root,
int whatToShow,
@@ -75,4 +88,3 @@
throws DOMException;
}
-
1.2 +99 -25 xml-xalan/java/src/org/w3c/dom/traversal/NodeFilter.java
Index: NodeFilter.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/traversal/NodeFilter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- NodeFilter.java 2000/10/02 02:43:16 1.1
+++ NodeFilter.java 2000/11/15 19:41:08 1.2
@@ -6,8 +6,8 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom.traversal;
@@ -15,54 +15,128 @@
import org.w3c.dom.Node;
/**
- * Filters are objects that know how to "filter out" nodes. If a
- * <code>NodeIterator</code> or <code>TreeWalker</code> is given a filter,
it
- * applies the filter before it returns the next node. If the filter says to
- * accept the node, the iterator returns it; otherwise, the iterator looks
- * for the next node and pretends that the node that was rejected was not
- * there.
- * <p> The DOM does not provide any filters. Filter is just an interface
that
- * users can implement to provide their own filters.
- * <p> Filters do not need to know how to iterate, nor do they need to know
- * anything about the data structure that is being iterated. This makes it
- * very easy to write filters, since the only thing they have to know how to
- * do is evaluate a single node. One filter may be used with a number of
- * different kinds of iterators, encouraging code reuse. This is an
- * ECMAScript function reference. This method returns a<code>short</code> .
- * The parameter is of type <code>Node</code> .
+ * Filters are objects that know how to "filter out" nodes. If a
+ * <code>NodeIterator</code> or <code>TreeWalker</code> is given a
+ * <code>NodeFilter</code>, it applies the filter before it returns the next
+ * node. If the filter says to accept the node, the traversal logic returns
+ * it; otherwise, traversal looks for the next node and pretends that the
+ * node that was rejected was not there.
+ * <p>The DOM does not provide any filters. <code>NodeFilter</code> is just
an
+ * interface that users can implement to provide their own filters.
+ * <p><code>NodeFilters</code> do not need to know how to traverse from node
+ * to node, nor do they need to know anything about the data structure that
+ * is being traversed. This makes it very easy to write filters, since the
+ * only thing they have to know how to do is evaluate a single node. One
+ * filter may be used with a number of different kinds of traversals,
+ * encouraging code reuse.
+ * <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
*/
public interface NodeFilter {
// Constants returned by acceptNode
+ /**
+ * Accept the node. Navigation methods defined for
+ * <code>NodeIterator</code> or <code>TreeWalker</code> will return this
+ * node.
+ */
public static final short FILTER_ACCEPT = 1;
+ /**
+ * Reject the node. Navigation methods defined for
+ * <code>NodeIterator</code> or <code>TreeWalker</code> will not return
+ * this node. For <code>TreeWalker</code>, the children of this node
+ * will also be rejected. <code>NodeIterators</code> treat this as a
+ * synonym for <code>FILTER_SKIP</code>.
+ */
public static final short FILTER_REJECT = 2;
+ /**
+ * Skip this single node. Navigation methods defined for
+ * <code>NodeIterator</code> or <code>TreeWalker</code> will not return
+ * this node. For both <code>NodeIterator</code> and
+ * <code>TreeWalker</code>, the children of this node will still be
+ * considered.
+ */
public static final short FILTER_SKIP = 3;
// Constants for whatToShow
+ /**
+ * Show all <code>Nodes</code>.
+ */
public static final int SHOW_ALL = 0xFFFFFFFF;
+ /**
+ * Show <code>Element</code> nodes.
+ */
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.
+ */
public static final int SHOW_ATTRIBUTE = 0x00000002;
+ /**
+ * Show <code>Text</code> nodes.
+ */
public static final int SHOW_TEXT = 0x00000004;
+ /**
+ * Show <code>CDATASection</code> nodes.
+ */
public static final int SHOW_CDATA_SECTION = 0x00000008;
+ /**
+ * Show <code>EntityReference</code> nodes.
+ */
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.
+ */
public static final int SHOW_ENTITY = 0x00000020;
+ /**
+ * Show <code>ProcessingInstruction</code> nodes.
+ */
public static final int SHOW_PROCESSING_INSTRUCTION = 0x00000040;
+ /**
+ * Show <code>Comment</code> nodes.
+ */
public static final int SHOW_COMMENT = 0x00000080;
+ /**
+ * Show <code>Document</code> nodes.
+ */
public static final int SHOW_DOCUMENT = 0x00000100;
+ /**
+ * Show <code>DocumentType</code> nodes.
+ */
public static final int SHOW_DOCUMENT_TYPE = 0x00000200;
+ /**
+ * Show <code>DocumentFragment</code> nodes.
+ */
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.
+ */
public static final int SHOW_NOTATION = 0x00000800;
/**
- * Test whether a specified node is visible in the logical view of a
- * TreeWalker or NodeIterator. This function will be called by the
- * implementation of TreeWalker and NodeIterator; it is not intended to
- * be called directly from user code.
- * @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 .
+ * Test whether a specified node is visible in the logical view of a
+ * <code>TreeWalker</code> or <code>NodeIterator</code>. This function
+ * will be called by the implementation of <code>TreeWalker</code> and
+ * <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,
+ * rejected, or skipped, as defined above.
*/
public short acceptNode(Node n);
}
-
1.2 +50 -37
xml-xalan/java/src/org/w3c/dom/traversal/NodeIterator.java
Index: NodeIterator.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/w3c/dom/traversal/NodeIterator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- NodeIterator.java 2000/10/02 02:43:16 1.1
+++ NodeIterator.java 2000/11/15 19:41:08 1.2
@@ -6,90 +6,103 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom.traversal;
-import org.w3c.dom.DOMException;
import org.w3c.dom.Node;
+import org.w3c.dom.DOMException;
/**
- * NodeIterators are used to step through a set of nodes, e.g. the set of
- * nodes in a NodeList, the document subtree governed by a particular node,
- * 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 NodeIterator. DOM
- * Level 2 specifies a single NodeIterator implementation for document-order
+ * <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 DocumentTraversal.createNodeIterator().
+ * 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
*/
public interface NodeIterator {
/**
- * The root node of the Iterator, as specified when it was created.
+ * The root node of the <code>NodeIterator</code>, as specified when it
+ * was created.
*/
public Node getRoot();
/**
- * This attribute determines which node types are presented via the
+ * This attribute determines which node types are presented via the
* iterator. The available set of constants is defined in the
- * <code>NodeFilter</code> interface.
+ * <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.
*/
public int getWhatToShow();
/**
- * The filter used to screen nodes.
+ * The <code>NodeFilter</code> used to screen nodes.
*/
public NodeFilter getFilter();
/**
* The value of this flag determines whether the children of entity
- * reference nodes are visible to the iterator. If false, they will be
- * skipped over.
+ * 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
+ * <code>NodeIterators</code> may reject a complete subtree rather than
+ * skipping individual nodes.
+ * <br>
* <br> To produce a view of the document that has entity references
- * expanded and does not expose the entity reference node itself, use
the
- * whatToShow flags to hide the entity reference node and set
- * expandEntityReferences to true when creating the iterator. To produce
- * a view of the document that has entity reference nodes but no entity
- * expansion, use the whatToShow flags to show the entity reference node
- * and set expandEntityReferences to false.
+ * 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.
*/
public boolean getExpandEntityReferences();
/**
- * Returns the next node in the set and advances the position of the
- * iterator in the set. After a NodeIterator is created, the first call
- * to nextNode() returns the first node in the set.
- * @return The next <code>Node</code> in the set being iterated over, or
+ * 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.
+ * @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
- * INVALID_STATE_ERR: Raised if this method is called after the
+ * INVALID_STATE_ERR: Raised if this method is called after the
* <code>detach</code> method was invoked.
*/
public Node nextNode()
throws DOMException;
/**
- * Returns the previous node in the set and moves the position of the
- * iterator backwards in the set.
- * @return The previous <code>Node</code> in the set being iterated
over,
- * or<code>null</code> if there are no more members in that set.
+ * Returns the previous node in the set and moves the position of the
+ * <code>NodeIterator</code> backwards in the set.
+ * @return The previous <code>Node</code> in the set being iterated
over,
+ * or <code>null</code> if there are no more members in that set.
* @exception DOMException
- * INVALID_STATE_ERR: Raised if this method is called after the
+ * INVALID_STATE_ERR: Raised if this method is called after the
* <code>detach</code> method was invoked.
*/
public Node previousNode()
throws DOMException;
/**
- * Detaches the iterator 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.
+ * 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.
*/
public void detach();
}
-
1.2 +87 -77 xml-xalan/java/src/org/w3c/dom/traversal/TreeWalker.java
Index: TreeWalker.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/w3c/dom/traversal/TreeWalker.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TreeWalker.java 2000/10/02 02:43:16 1.1
+++ TreeWalker.java 2000/11/15 19:41:08 1.2
@@ -6,152 +6,162 @@
* Intellectual Property License. This program is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
*/
package org.w3c.dom.traversal;
-import org.w3c.dom.DOMException;
import org.w3c.dom.Node;
+import org.w3c.dom.DOMException;
/**
* <code>TreeWalker</code> objects are used to navigate a document tree or
- * subtree using the view of the document defined by its
- * <code>whatToShow</code> flags and any filters that are defined for the
- * <code>TreeWalker</code> . Any function which performs navigation using a
- * <code>TreeWalker</code> will automatically support any view defined by a
- * <code>TreeWalker</code> .
- * <p> Omitting nodes from the logical view of a subtree can result in a
+ * subtree using the view of the document defined by their
+ * <code>whatToShow</code> flags and filter (if any). Any function which
+ * performs navigation using a <code>TreeWalker</code> will automatically
+ * support any view defined by a <code>TreeWalker</code>.
+ * <p>Omitting nodes from the logical view of a subtree can result in a
* structure that is substantially different from the same subtree in the
- * complete, unfiltered document. Nodes that are siblings in the TreeWalker
- * view may be children of different, widely separated nodes in the original
- * view. For instance, consider a Filter that skips all nodes except for
Text
- * nodes and the root node of a document. In the logical view that results,
- * all text nodes will be siblings and appear as direct children of the root
- * node, no matter how deeply nested the structure of the original document.
+ * complete, unfiltered document. Nodes that are siblings in the
+ * <code>TreeWalker</code> view may be children of different, widely
+ * separated nodes in the original view. For instance, consider a
+ * <code>NodeFilter</code> that skips all nodes except for Text nodes and
+ * the root node of a document. In the logical view that results, all text
+ * nodes will be siblings and appear as direct children of the root node, no
+ * matter how deeply nested the structure of the original document.
+ * <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
*/
public interface TreeWalker {
/**
- * The root node of the TreeWalker, as specified when it was created.
+ * The <code>root</code> node of the <code>TreeWalker</code>, as
specified
+ * when it was created.
*/
public Node getRoot();
/**
- * This attribute determines which node types are presented via the
- * TreeWalker. These constants are defined in the
<code>NodeFilter</code>
- * interface.
+ * This attribute determines which node types are presented via the
+ * <code>TreeWalker</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.
*/
public int getWhatToShow();
/**
- * The filter used to screen nodes.
+ * The filter used to screen nodes.
*/
public NodeFilter getFilter();
/**
- * The value of this flag determines whether the children of entity
- * reference nodes are visible to the TreeWalker. If false, they will be
- * skipped over.
+ * 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
+ * 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
the
- * whatToShow flags to hide the entity reference node and set
- * expandEntityReferences to true when creating the TreeWalker. To
- * produce a view of the document that has entity reference nodes but no
- * entity expansion, use the whatToShow flags to show the entity
- * reference node and set expandEntityReferences to false.
+ * 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
+ * <code>TreeWalker</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();
/**
- * The node at which the TreeWalker is currently positioned.
- * <br> The value must not be null. Alterations to the DOM tree may
cause
- * the current node to no longer be accepted by the TreeWalker's
- * associated filter. currentNode may also be explicitly set to any
node,
- * whether or not it is within the subtree specified by the root node or
- * would be accepted by the filter and whatToShow flags. Further
- * traversal occurs relative to currentNode even if it is not part of
the
- * current view by applying the filters in the requested direction (not
- * changing currentNode where no traversal is possible).
+ * 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 the specified
<code>currentNode</code>
- * is<code>null</code> .
+ * NOT_SUPPORTED_ERR: Raised if an attempt is made to set
+ * <code>currentNode</code> to <code>null</code>.
*/
public Node getCurrentNode();
public void setCurrentNode(Node currentNode)
- throws DOMException;
+ throws DOMException;
/**
- * Moves to and returns the closest visible ancestor node of the
current
- * node. If the search for parentNode attempts to step upward from the
- * TreeWalker's root node, or if it fails to find a visible ancestor
- * node, this method retains the current position and returns null.
- * @return The new parent node, or null if the current node has no
parent
- * in the TreeWalker's logical view.
+ * Moves to and returns the closest visible ancestor node of the current
+ * node. If the search for <code>parentNode</code> attempts to step
+ * upward from the <code>TreeWalker</code>'s <code>root</code> node, or
+ * if it fails to find a visible ancestor node, this method retains the
+ * current position and returns <code>null</code>.
+ * @return The new parent node, or <code>null</code> if the current node
+ * has no parent in the <code>TreeWalker</code>'s logical view.
*/
public Node parentNode();
/**
- * Moves the <code>TreeWalker</code> to the first visible child of the
+ * Moves the <code>TreeWalker</code> to the first visible child of the
* current node, and returns the new node. If the current node has no
- * visible children, returns <code>null</code> , and retains the current
+ * visible children, returns <code>null</code>, and retains the current
* node.
- * @return The new node, or <code>null</code> if the current node has
no
- * visible children in the TreeWalker's logical view.
+ * @return The new node, or <code>null</code> if the current node has no
+ * visible children in the <code>TreeWalker</code>'s logical view.
*/
public Node firstChild();
/**
- * Moves the <code>TreeWalker</code> to the last visible child of the
+ * Moves the <code>TreeWalker</code> to the last visible child of the
* current node, and returns the new node. If the current node has no
- * visible children, returns <code>null</code> , and retains the current
+ * visible children, returns <code>null</code>, and retains the current
* node.
- * @return The new node, or <code>null</code> if the current node has
no
- * children in the TreeWalker's logical view.
+ * @return The new node, or <code>null</code> if the current node has no
+ * children in the <code>TreeWalker</code>'s logical view.
*/
public Node lastChild();
/**
- * Moves the <code>TreeWalker</code> to the previous sibling of the
+ * Moves the <code>TreeWalker</code> to the previous sibling of the
* current node, and returns the new node. If the current node has no
- * visible previous sibling, returns <code>null</code> , and retains the
+ * visible previous sibling, returns <code>null</code>, and retains the
* current node.
- * @return The new node, or <code>null</code> if the current node has
no
- * previous sibling in the TreeWalker's logical view.
+ * @return The new node, or <code>null</code> if the current node has no
+ * previous sibling. in the <code>TreeWalker</code>'s logical view.
*/
public Node previousSibling();
/**
- * Moves the <code>TreeWalker</code> to the next sibling of the current
+ * Moves the <code>TreeWalker</code> to the next sibling of the current
* node, and returns the new node. If the current node has no visible
- * next sibling, returns <code>null</code> , and retains the current
node.
- * @return The new node, or <code>null</code> if the current node has
no
- * next sibling in the TreeWalker's logical view.
+ * next sibling, returns <code>null</code>, and retains the current node.
+ * @return The new node, or <code>null</code> if the current node has no
+ * next sibling. in the <code>TreeWalker</code>'s logical view.
*/
public Node nextSibling();
/**
- * Moves the <code>TreeWalker</code> to the previous visible node in
- * document order relative to the current node, and returns the new
node.
- * If the current node has no previous node, or if the search for
- * previousNode attempts to step upward from the TreeWalker's root node,
- * returns <code>null</code> , and retains the current node.
- * @return The new node, or <code>null</code> if the current node has
no
- * previous node in the TreeWalker's logical view.
+ * Moves the <code>TreeWalker</code> to the previous visible node in
+ * document order relative to the current node, and returns the new
+ * node. If the current node has no previous node, or if the search for
+ * <code>previousNode</code> attempts to step upward from the
+ * <code>TreeWalker</code>'s <code>root</code> node, returns
+ * <code>null</code>, and retains the current node.
+ * @return The new node, or <code>null</code> if the current node has no
+ * previous node in the <code>TreeWalker</code>'s logical view.
*/
public Node previousNode();
/**
- * Moves the <code>TreeWalker</code> to the next visible node in
document
+ * Moves the <code>TreeWalker</code> to the next visible node in
document
* order relative to the current node, and returns the new node. If the
- * current node has no next node, or if the search for nextNode
attempts
- * to step upward from the TreeWalker's root node, returns
- * <code>null</code> , and retains the current node.
- * @return The new node, or <code>null</code> if the current node has
no
- * next node in the TreeWalker's logical view.
+ * current node has no next node, or if the search for nextNode attempts
+ * to step upward from the <code>TreeWalker</code>'s <code>root</code>
+ * node, returns <code>null</code>, and retains the current node.
+ * @return The new node, or <code>null</code> if the current node has no
+ * next node in the <code>TreeWalker</code>'s logical view.
*/
public Node nextNode();
}
-