You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by el...@apache.org on 2003/03/20 01:38:31 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/util DOMErrorHandlerWrapper.java
elena 2003/03/19 16:38:30
Modified: java/src/dom3/org/w3c/dom Attr.java CDATASection.java
CharacterData.java Comment.java
DOMConfiguration.java DOMError.java
DOMErrorHandler.java DOMException.java
DOMImplementation.java DOMImplementationSource.java
DOMLocator.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 TypeInfo.java
UserDataHandler.java
java/src/org/apache/xerces/dom AttrImpl.java
CoreDOMImplementationImpl.java
DOMImplementationSourceImpl.java
DOMLocatorImpl.java DOMNormalizer.java
NodeImpl.java TextImpl.java
java/src/org/apache/xerces/dom3 DOMImplementationSource.java
DOMLocator.java
java/src/org/apache/xerces/impl/xs/opti AttrImpl.java
DefaultNode.java
java/src/org/apache/xerces/util DOMErrorHandlerWrapper.java
Added: java/src/dom3/org/w3c/dom DOMImplementationList.java
DOMStringList.java NameList.java
java/src/dom3/org/w3c/dom/bootstrap
DOMImplementationListImpl.java
DOMImplementationRegistry.java
java/src/org/apache/xerces/dom
DOMImplementationListImpl.java
java/src/org/apache/xerces/dom3 DOMImplementationList.java
java/src/org/apache/xerces/dom3/bootstrap
DOMImplementationListImpl.java
DOMImplementationRegistry.java
Removed: java/src/dom3/org/w3c/dom DOMImplementationRegistry.java
Log:
Modified the Xerces DOM implementation according to the latest DOM L3 draft:
http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/
Revision Changes Path
1.5 +97 -97 xml-xerces/java/src/dom3/org/w3c/dom/Attr.java
Index: Attr.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/Attr.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Attr.java 16 Jan 2003 22:54:16 -0000 1.4
+++ Attr.java 20 Mar 2003 00:38:28 -0000 1.5
@@ -1,13 +1,13 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
@@ -18,55 +18,55 @@
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
- * The <code>Attr</code> interface represents an attribute in an
- * <code>Element</code> object. Typically the allowable values for the
+ *
+ * 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
- * make it more efficient to implement such features as default attributes
- * 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
+ * <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,
+ * <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
+ * <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
+ * <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>The DOM implementation does not perform any attribute value normalization
- * . While it is expected that the <code>value</code> and
- * <code>nodeValue</code> attributes of an <code>Attr</code> node initially
- * return the normalized value, this may not be the case after mutation.
- * This is true, independently of whether the mutation is performed by
- * setting the string value directly or by changing the <code>Attr</code>
- * child nodes. In particular, this is true when character entity references
- * are involved, given that they are not represented in the DOM and they
- * impact attribute value normalization. The properties [attribute type] and
- * [references] defined in are not accessible from DOM Level 3 Core.
- * However, does provide a way to access the property [attribute type].
- * <p>See also the <a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <p> The DOM implementation does not perform any kind of normalization.
+ * While it is expected that the <code>value</code> and
+ * <code>nodeValue</code> attributes of an <code>Attr</code> node would
+ * initially return a normalized value depending on the schema in used, this
+ * may not be the case after mutation. This is true, independently of
+ * whether the mutation is performed by setting the string value directly or
+ * by changing the <code>Attr</code> child nodes. In particular, this is
+ * true when character entity references are involved, given that they are
+ * not represented in the DOM and they impact attribute value normalization.
+ * <p ><b>Note:</b> The property [references] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * is not accessible from DOM Level 3 Core.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface Attr extends Node {
/**
@@ -75,30 +75,18 @@
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
- * 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
- * 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
- * default value in the DTD.If the attribute has no assigned value in
- * the document and has a value of #IMPLIED in the DTD, then the
- * attribute does not appear in the structure model of the document.If
- * 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>.
- * <br> This attribute represents the property [specified] defined .
+ * <code>True</code> if this attribute was explicitly given a value in the
+ * instance document, <code>false</code> otherwise. If the user changes
+ * the value of this attribute node (even if it ends up having the same
+ * value as the default value) then this is set to <code>true</code>.
+ * Removing attributes for which a default value is defined in the DTD
+ * generates a new attribute with the default value and this set to
+ * <code>false</code>. The implementation may handle attributes with
+ * default values from other schemas similarly but applications should
+ * use <code>normalizeDocument()</code> to guarantee this information is
+ * up-to-date.
+ * <br> This attribute is based on the property [specified] defined [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
*/
public boolean getSpecified();
@@ -112,11 +100,14 @@
* would recognize as markup are instead treated as literal text. See
* also the method <code>setAttribute</code> on the <code>Element</code>
* interface.
- * <br> If the <code>value</code> does contain the normalized attribute
- * value, this attribute represents the property [normalized value]
- * defined in .
- * @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
+ * <p ><b>Note:</b> Some specialized implementations, such as some [<a href='http://www.w3.org/TR/2001/REC-SVG-20010904'>SVG 1.0</a>]
+ * implementations, may do normalization automatically, even after
+ * mutation; in such case, the value on retrieval may differ from the
+ * value on setting.
+ * <br> The <code>value</code> may contain the normalized attribute value
+ * and represents in that case the property [normalized value] defined
+ * in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
*/
public String getValue();
/**
@@ -129,37 +120,46 @@
* would recognize as markup are instead treated as literal text. See
* also the method <code>setAttribute</code> on the <code>Element</code>
* interface.
- * <br> If the <code>value</code> does contain the normalized attribute
- * value, this attribute represents the property [normalized value]
- * defined in .
+ * <p ><b>Note:</b> Some specialized implementations, such as some [<a href='http://www.w3.org/TR/2001/REC-SVG-20010904'>SVG 1.0</a>]
+ * implementations, may do normalization automatically, even after
+ * mutation; in such case, the value on retrieval may differ from the
+ * value on setting.
+ * <br> The <code>value</code> may contain the normalized attribute value
+ * and represents in that case the property [normalized value] defined
+ * in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
*/
public void setValue(String value)
- throws DOMException;
+ throws DOMException;
/**
* The <code>Element</code> node this attribute is attached to or
* <code>null</code> if this attribute is not in use.
- * <br> This attribute represents the property [owner element] defined in
+ * <br> This attribute represents the property [owner element] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
* .
* @since DOM Level 2
*/
public Element getOwnerElement();
/**
- * Returns whether this attribute is known to be of type ID or not.
- * When it is and its value is unique, the ownerElement of this attribute
- * can be retrieved using getElementById on Document.
- *
- * @since DOM Level 3
+ * The type information associated with this attribute.
+ * @since DOM Level 3
*/
- public boolean getIsId();
-
+ public TypeInfo getSchemaTypeInfo();
+
/**
- * The type information associated with this element.
+ * Returns whether this attribute is known to be of type ID or not. When
+ * it is and its value is unique, the <code>ownerElement</code> of this
+ * attribute can be retrieved using <code>Document.getElementById</code>.
+ * This translates to getIsId() in Java. Is that ok? changed to be a
+ * method. How does this relate to <code>schemaTypeInfo</code>? no
+ * relation.
+ * @return <code>true</code> if this attribute is of type ID,
+ * <code>false</code> otherwise.
* @since DOM Level 3
*/
- public TypeInfo getSchemaTypeInfo();
+ public boolean isId();
}
1.3 +26 -27 xml-xerces/java/src/dom3/org/w3c/dom/CDATASection.java
Index: CDATASection.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/CDATASection.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CDATASection.java 19 Jun 2002 22:27:10 -0000 1.2
+++ CDATASection.java 20 Mar 2003 00:38:28 -0000 1.3
@@ -1,24 +1,24 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
+ *
* 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
@@ -26,8 +26,7 @@
* 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
- * contain characters that need to be escaped outside of CDATA sections and
+ * the text that is contained by the CDATA section. Note that this <em>may</em> 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.
@@ -35,20 +34,20 @@
* <code>CharacterData</code> interface through the <code>Text</code>
* interface. Adjacent <code>CDATASection</code> nodes are not merged by use
* of the <code>normalize</code> method of the <code>Node</code> interface.
- * 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
- * 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,
- * 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/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <p ><b>Note:</b> 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.
+ * <p ><b>Note:</b> 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, 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/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface CDATASection extends Text {
}
1.3 +22 -24 xml-xerces/java/src/dom3/org/w3c/dom/CharacterData.java
Index: CharacterData.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/CharacterData.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CharacterData.java 19 Jun 2002 22:27:10 -0000 1.2
+++ CharacterData.java 20 Mar 2003 00:38:28 -0000 1.3
@@ -1,24 +1,24 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
+ *
* 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
@@ -30,7 +30,7 @@
* 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/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface CharacterData extends Node {
/**
@@ -43,11 +43,11 @@
* appropriately sized pieces.
* <br> When the <code>CharacterData</code> is a <code>Text</code>, or a
* <code>CDATASection</code>, this attribute contains the property
- * [character code] defined in . When the <code>CharacterData</code> is
- * a <code>Comment</code>, this attribute contains the property
- * [content] defined by the Comment Information Item in .
- * @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
+ * [character code] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * . When the <code>CharacterData</code> is a <code>Comment</code>, this
+ * attribute contains the property [content] defined by the Comment
+ * Information Item in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
* @exception DOMException
* DOMSTRING_SIZE_ERR: Raised when it would return more characters than
* fit in a <code>DOMString</code> variable on the implementation
@@ -65,15 +65,13 @@
* appropriately sized pieces.
* <br> When the <code>CharacterData</code> is a <code>Text</code>, or a
* <code>CDATASection</code>, this attribute contains the property
- * [character code] defined in . When the <code>CharacterData</code> is
- * a <code>Comment</code>, this attribute contains the property
- * [content] defined by the Comment Information Item in .
+ * [character code] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * . When the <code>CharacterData</code> is a <code>Comment</code>, this
+ * attribute contains the property [content] defined by the Comment
+ * Information Item in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
- * @exception DOMException
- * DOMSTRING_SIZE_ERR: Raised when it would return more characters than
- * fit in a <code>DOMString</code> variable on the implementation
- * platform.
*/
public void setData(String data)
throws DOMException;
1.3 +12 -13 xml-xerces/java/src/dom3/org/w3c/dom/Comment.java
Index: Comment.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/Comment.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Comment.java 19 Jun 2002 22:27:10 -0000 1.2
+++ Comment.java 20 Mar 2003 00:38:28 -0000 1.3
@@ -1,31 +1,30 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
-
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
+ *
* 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.
- * <p>See also the <a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface Comment extends CharacterData {
}
1.2 +147 -159 xml-xerces/java/src/dom3/org/w3c/dom/DOMConfiguration.java
Index: DOMConfiguration.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/DOMConfiguration.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DOMConfiguration.java 11 Dec 2002 16:17:01 -0000 1.1
+++ DOMConfiguration.java 20 Mar 2003 00:38:28 -0000 1.2
@@ -1,19 +1,24 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
+ * The DOM Level 3 specification is at the stage
+ * of Working Draft, which represents work in
+ * progress and thus may be updated, replaced,
+ * or obsoleted by other documents at any time.
+ *
* The <code>DOMConfiguration</code> interface represents the configuration
* of a document and maintains a table of recognized parameters. Using the
* configuration, it is possible to change
@@ -21,8 +26,8 @@
* <code>CDATASection</code> nodes with <code>Text</code> nodes or
* specifying the type of the schema that must be used when the validation
* of the <code>Document</code> is requested. <code>DOMConfiguration</code>
- * objects are also used in [<a href='http://www.w3.org/TR/DOM-Level-3-LS'>DOM Level 3 Load and Save</a>] in the <code>DOMBuilder</code> and
- * <code>DOMWriter</code> interfaces.
+ * objects are also used in [<a href='http://www.w3.org/TR/DOM-Level-3-LS'>DOM Level 3 Load and Save</a>]
+ * in the <code>DOMBuilder</code> and <code>DOMWriter</code> interfaces.
* <p> The <code>DOMConfiguration</code> distinguish two types of parameters:
* <code>boolean</code> (boolean parameters) and <code>DOMUserData</code>
* (parameters). The names used by the <code>DOMConfiguration</code> object
@@ -35,8 +40,9 @@
* recognize all boolean parameters and parameters defined in this
* specification. Each boolean parameter state or parameter value may then
* be supported or not by the implementation. Refer to their definition to
- * know if a state or a value must be supported or not. Parameters are
- * similar to features and properties used in SAX2 [<a href='http://www.saxproject.org/'>SAX</a>]. Can we rename boolean
+ * know if a state or a value must be supported or not.
+ * <p ><b>Note:</b> Parameters are similar to features and properties used in
+ * SAX2 [<a href='http://www.saxproject.org/'>SAX</a>]. Can we rename boolean
* parameters to "flags"? Are boolean parameters and parameters within the
* same scope for uniqueness? Which exception should be raised by
* <code>setBooleanParameter("error-handler", true)</code>?
@@ -44,50 +50,51 @@
* <dl>
* <dt>
* <code>"error-handler"</code></dt>
- * <dd>[required] A <code>DOMErrorHandler</code>
- * object. If an error is encountered in the document, the implementation
- * will call back the <code>DOMErrorHandler</code> registered using this
- * parameter. When called, <code>DOMError.relatedData</code> will contain
- * the closest node to where the error occured. If the implementation is
- * unable to determine the node where the error occurs,
- * <code>DOMError.relatedData</code> will contain the <code>Document</code>
- * node. Mutations to the document from within an error handler will result
- * in implementation dependent behaviour. Should we say non "readonly"
- * operations are implementation dependent instead? Removed: "or
- * re-invoking a validation operation". </dd>
- * <dt><code>"schema-type"</code></dt>
- * <dd>[optional]
- * A <code>DOMString</code> object containing an absolute URI and
+ * <dd>[<em>required</em>] A <code>DOMErrorHandler</code> object. If an error is encountered in
+ * the document, the implementation will call back the
+ * <code>DOMErrorHandler</code> registered using this parameter. When
+ * called, <code>DOMError.relatedData</code> will contain the closest node
+ * to where the error occured. If the implementation is unable to determine
+ * the node where the error occurs, <code>DOMError.relatedData</code> will
+ * contain the <code>Document</code> node. Mutations to the document from
+ * within an error handler will result in implementation dependent
+ * behaviour. Should we say non "readonly" operations are implementation
+ * dependent instead? Removed: "or re-invoking a validation operation". </dd>
+ * <dt>
+ * <code>"schema-type"</code></dt>
+ * <dd>[<em>optional</em>] A <code>DOMString</code> object containing an absolute URI and
* representing the type of the schema language used to validate a document
* against. Note that no lexical checking is done on the absolute URI. If
* this parameter is not set, a default value may be provided by the
* implementation, based on the schema languages supported and on the schema
- * language used at load time. For XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>], applications must use the
- * value <code>"http://www.w3.org/2001/XMLSchema"</code>. For XML DTD [<a href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>],
+ * language used at load time.
+ * <p ><b>Note:</b> For XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
+ * , applications must use the value
+ * <code>"http://www.w3.org/2001/XMLSchema"</code>. For XML DTD [<a href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>],
* applications must use the value
* <code>"http://www.w3.org/TR/REC-xml"</code>. Other schema languages are
* outside the scope of the W3C and therefore should recommend an absolute
* URI in order to use this method. </dd>
* <dt><code>"schema-location"</code></dt>
- * <dd>[optional]
- * A <code>DOMString</code> object containing a list of URIs, separated by
- * white spaces (characters matching the nonterminal production S defined in
- * section 2.3 [<a href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>]), that represents the schemas against which validation
- * should occur. The types of schemas referenced in this list must match the
- * type specified with <code>schema-type</code>, otherwise the behaviour of
- * an implementation is undefined. If the schema type is XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>], only
- * one of the XML Schemas in the list can be with no namespace. If
+ * <dd>[<em>optional</em>] A <code>DOMString</code> object containing a list of URIs, separated by
+ * white spaces (characters matching the <a href='http://www.w3.org/TR/2000/REC-xml-20001006#NT-S'>nonterminal
+ * production S</a> defined in section 2.3 [<a href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>]), that
+ * represents the schemas against which validation should occur. The types
+ * of schemas referenced in this list must match the type specified with
+ * <code>schema-type</code>, otherwise the behaviour of an implementation is
+ * undefined. If the schema type is XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
+ * , only one of the XML Schemas in the list can be with no namespace. If
* validation occurs against a namespace aware schema, i.e. XML Schema, and
* the targetNamespace of a schema (specified using this property) matches
* the targetNamespace of a schema occurring in the instance document, i.e
* in schemaLocation attribute, the schema specified by the user using this
* property will be used (i.e., in XML Schema the <code>schemaLocation</code>
* attribute in the instance document or on the <code>import</code> element
- * will be effectively ignored). It is illegal to set the schema-location
- * parameter if the schema-type parameter value is not set. It is strongly
- * recommended that <code>DOMInputSource.baseURI</code> will be set, so that
- * an implementation can successfully resolve any external entities
- * referenced. </dd>
+ * will be effectively ignored).
+ * <p ><b>Note:</b> It is illegal to set the schema-location parameter if the
+ * schema-type parameter value is not set. It is strongly recommended that
+ * <code>DOMInputSource.baseURI</code> will be set, so that an
+ * implementation can successfully resolve any external entities referenced. </dd>
* </dl>
* <p> The following list of boolean parameters (features) defined in the DOM:
* <dl>
@@ -96,64 +103,54 @@
* <dd>
* <dl>
* <dt><code>true</code></dt>
- * <dd>[optional]Canonicalize the
- * document according to the rules specified in [<a href='http://www.w3.org/TR/2001/REC-xml-c14n-20010315'>Canonical XML</a>]. Note that this is limited
- * to what can be represented in the DOM. In particular, there is no way to
- * specify the order of the attributes in the DOM. What happen to other
- * features? are they ignored? if yes, how do you know if a feature is
- * ignored? </dd>
+ * <dd>[<em>optional</em>]Canonicalize the document according to the rules specified in [<a href='http://www.w3.org/TR/2001/REC-xml-c14n-20010315'>Canonical XML</a>].
+ * Note that this is limited to what can be represented in the DOM. In
+ * particular, there is no way to specify the order of the attributes in the
+ * DOM. What happen to other features? are they ignored? if yes, how do you
+ * know if a feature is ignored? </dd>
* <dt><code>false</code></dt>
- * <dd>[required] (default)Do not canonicalize the
- * document.</dd>
+ * <dd>[<em>required</em>] (<em>default</em>)Do not canonicalize the document.</dd>
* </dl></dd>
* <dt><code>"cdata-sections"</code></dt>
* <dd>
* <dl>
- * <dt><code>true</code></dt>
- * <dd>[required] (default
- * )Keep <code>CDATASection</code> nodes in the document.Name does not work
+ * <dt>
+ * <code>true</code></dt>
+ * <dd>[<em>required</em>] (<em>default</em>)Keep <code>CDATASection</code> nodes in the document.Name does not work
* really well in this case. ALH suggests renaming this to "cdata-sections".
* It works for both load and save.Renamed as suggested. (Telcon 27 Jan
* 2002).</dd>
* <dt><code>false</code></dt>
- * <dd>[required]Transform <code>CDATASection</code>
- * nodes in the document into <code>Text</code> nodes. The new
- * <code>Text</code> node is then combined with any adjacent
- * <code>Text</code> node.</dd>
+ * <dd>[<em>required</em>]Transform <code>CDATASection</code> nodes in the document into
+ * <code>Text</code> nodes. The new <code>Text</code> node is then combined
+ * with any adjacent <code>Text</code> node.</dd>
* </dl></dd>
* <dt><code>"comments"</code></dt>
* <dd>
* <dl>
- * <dt><code>true</code></dt>
- * <dd>[required]
- * (default)Keep <code>Comment</code> nodes in the document.</dd>
* <dt>
- * <code>false</code></dt>
- * <dd>[required]Discard <code>Comment</code> nodes in the
- * Document.</dd>
+ * <code>true</code></dt>
+ * <dd>[<em>required</em>] (<em>default</em>)Keep <code>Comment</code> nodes in the document.</dd>
+ * <dt><code>false</code></dt>
+ * <dd>[<em>required</em>]Discard <code>Comment</code> nodes in the Document.</dd>
* </dl></dd>
- * <dt><code>"datatype-normalization"</code></dt>
+ * <dt>
+ * <code>"datatype-normalization"</code></dt>
* <dd>
* <dl>
* <dt><code>true</code></dt>
- * <dd>[required]
- * Let the validation process do its datatype normalization that is defined
- * in the used schema language. Note that this does not affect the DTD
- * normalization operation which always takes place, in accordance to [<a href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>].We
- * should define "datatype normalization".DTD normalization always apply
- * because it's part of XML 1.0. Clarify the spec. (Telcon 27 Jan 2002).</dd>
- * <dt>
- * <code>false</code></dt>
- * <dd>[required] (default)Disable datatype normalization. The
- * XML 1.0 attribute value normalization always occurs though.</dd>
+ * <dd>[<em>required</em>] Exposed normalized values in the tree. We should define "datatype
+ * normalization".DTD normalization always apply because it's part of XML
+ * 1.0. Clarify the spec. (Telcon 27 Jan 2002).</dd>
+ * <dt><code>false</code></dt>
+ * <dd>[<em>required</em>] (<em>default</em>) Do not perform normalization on the tree. </dd>
* </dl></dd>
* <dt>
* <code>"discard-default-content"</code></dt>
* <dd>
* <dl>
* <dt><code>true</code></dt>
- * <dd>[required] (default
- * )Use whatever information available to the implementation (i.e. XML
+ * <dd>[<em>required</em>] (<em>default</em>)Use whatever information available to the implementation (i.e. XML
* schema, DTD, the <code>specified</code> flag on <code>Attr</code> nodes,
* and so on) to decide what attributes and content should be discarded or
* not. Note that the <code>specified</code> flag on <code>Attr</code> nodes
@@ -165,24 +162,22 @@
* level 1 implementations?Remove "Level 1" (Telcon 16 Jan 2002).</dd>
* <dt>
* <code>false</code></dt>
- * <dd>[required]Keep all attributes and all content.</dd>
+ * <dd>[<em>required</em>]Keep all attributes and all content.</dd>
* </dl></dd>
- * <dt>
- * <code>"entities"</code></dt>
+ * <dt><code>"entities"</code></dt>
* <dd>
* <dl>
- * <dt><code>true</code></dt>
- * <dd>[required]Keep
- * <code>EntityReference</code> and <code>Entity</code> nodes in the
+ * <dt>
+ * <code>true</code></dt>
+ * <dd>[<em>required</em>]Keep <code>EntityReference</code> and <code>Entity</code> nodes in the
* document.How does that interact with expand-entity-references? ALH
* suggests consolidating the two to a single feature called
* "entity-references" that is used both for load and save.Consolidate both
* features into a single feature called 'entities'. (Telcon 27 Jan 2002).</dd>
* <dt>
* <code>false</code></dt>
- * <dd>[required] (default)Remove all
- * <code>EntityReference</code> and <code>Entity</code> nodes from the
- * document, putting the entity expansions directly in their place.
+ * <dd>[<em>required</em>] (<em>default</em>)Remove all <code>EntityReference</code> and <code>Entity</code> nodes
+ * from the document, putting the entity expansions directly in their place.
* <code>Text</code> nodes are into "normal" form. Only
* <code>EntityReference</code> nodes to non-defined entities are kept in
* the document.</dd>
@@ -191,9 +186,9 @@
* <dd>
* <dl>
* <dt><code>true</code></dt>
- * <dd>[required]Only keep
- * in the document the information defined in the XML Information Set [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>].This
- * forces the following features to <code>false</code>:
+ * <dd>[<em>required</em>]Only keep in the document the information defined in the XML Information
+ * Set [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .This forces the following features to <code>false</code>:
* <code>namespace-declarations</code>, <code>validate-if-schema</code>,
* <code>entities</code>, <code>datatype-normalization</code>,
* <code>cdata-sections</code>.This forces the following features to
@@ -216,115 +211,108 @@
* <dd>
* <dl>
* <dt><code>true</code></dt>
- * <dd>[
- * required] (default) Perform the namespace processing as defined in [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]. </dd>
- * <dt>
- * <code>false</code></dt>
- * <dd>[optional] Do not perform the namespace processing. </dd>
+ * <dd>[<em>required</em>] (<em>default</em>) Perform the namespace processing as defined in [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+ * . </dd>
+ * <dt><code>false</code></dt>
+ * <dd>[<em>optional</em>] Do not perform the namespace processing. </dd>
* </dl></dd>
* <dt>
* <code>"namespace-declarations"</code></dt>
* <dd>
* <dl>
* <dt><code>true</code></dt>
- * <dd>[required] (default)
- * Include namespace declaration attributes, specified or defaulted from the
- * schema or the DTD, in the document. See also the section Declaring
- * Namespaces in [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>].</dd>
- * <dt><code>false</code></dt>
- * <dd>[required]Discard all namespace
- * declaration attributes. The Namespace prefixes are retained even if this
- * feature is set to <code>false</code>.</dd>
+ * <dd>[<em>required</em>] (<em>default</em>)Include namespace declaration attributes, specified or defaulted from
+ * the schema or the DTD, in the document. See also the section <a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/#ns-decl'>Declaring
+ * Namespaces</a> in [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+ * .</dd>
+ * <dt><code>false</code></dt>
+ * <dd>[<em>required</em>]Discard all namespace declaration attributes. The Namespace prefixes are
+ * retained even if this feature is set to <code>false</code>.</dd>
* </dl></dd>
- * <dt><code>"normalize-characters"</code></dt>
+ * <dt>
+ * <code>"normalize-characters"</code></dt>
* <dd>
* <dl>
- * <dt>
- * <code>true</code></dt>
- * <dd>[optional]Perform the W3C Text Normalization of the
- * characters [<a href='http://www.w3.org/TR/2002/WD-charmod-20020430'>CharModel</a>] in the document. </dd>
+ * <dt><code>true</code></dt>
+ * <dd>[<em>optional</em>]Perform the W3C Text Normalization of the characters [<a href='http://www.w3.org/TR/2002/WD-charmod-20020430'>CharModel</a>] in the
+ * document. </dd>
* <dt><code>false</code></dt>
- * <dd>[required] (default)Do not
- * perform character normalization.</dd>
+ * <dd>[<em>required</em>] (<em>default</em>)Do not perform character normalization.</dd>
* </dl></dd>
- * <dt><code>"split-cdata-sections"</code></dt>
+ * <dt>
+ * <code>"split-cdata-sections"</code></dt>
* <dd>
* <dl>
+ * <dt><code>true</code></dt>
+ * <dd>[<em>required</em>] (<em>default</em>)Split CDATA sections containing the CDATA section termination marker
+ * ']]>'. When a CDATA section is split a warning is issued.</dd>
* <dt>
- * <code>true</code></dt>
- * <dd>[required] (default)Split CDATA sections containing the
- * CDATA section termination marker ']]>'. When a CDATA section is split
- * a warning is issued.</dd>
- * <dt><code>false</code></dt>
- * <dd>[required]Signal an error if a
- * <code>CDATASection</code> contains an unrepresentable character.</dd>
+ * <code>false</code></dt>
+ * <dd>[<em>required</em>]Signal an error if a <code>CDATASection</code> contains an
+ * unrepresentable character.</dd>
* </dl></dd>
- * <dt>
- * <code>"validate"</code></dt>
+ * <dt><code>"validate"</code></dt>
* <dd>
* <dl>
* <dt><code>true</code></dt>
- * <dd>[optional] Require the validation
- * against a schema (i.e. XML schema, DTD, any other type or representation
- * of schema) of the document as it is being normalized as defined by [<a href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>]. If
+ * <dd>[<em>optional</em>] Require the validation against a schema (i.e. XML schema, DTD, any
+ * other type or representation of schema) of the document as it is being
+ * normalized as defined by [<a href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>]. If
* validation errors are found, or no schema was found, the error handler is
- * notified. Note also that no datatype normalization (i.e. non-XML 1.0
- * normalization) is done according to the schema used unless the feature
- * <code>datatype-normalization</code> is <code>true</code>.
- * <code>validate-if-schema</code> and <code>validate</code> are mutually
- * exclusive, setting one of them to <code>true</code> will set the other
- * one to <code>false</code>. </dd>
- * <dt><code>false</code></dt>
- * <dd>[required] (default) Only
- * XML 1.0 non-validating processing must be done. Note that validation
- * might still happen if <code>validate-if-schema</code> is <code>true</code>
- * . </dd>
+ * notified. Note also that normalized values will not be exposed to the
+ * schema in used unless the feature <code>datatype-normalization</code> is
+ * <code>true</code>.
+ * <p ><b>Note:</b> <code>validate-if-schema</code> and <code>validate</code>
+ * are mutually exclusive, setting one of them to <code>true</code> will set
+ * the other one to <code>false</code>. </dd>
+ * <dt><code>false</code></dt>
+ * <dd>[<em>required</em>] (<em>default</em>) Only XML 1.0 non-validating processing must be done. Note that
+ * validation might still happen if <code>validate-if-schema</code> is
+ * <code>true</code>. </dd>
* </dl></dd>
* <dt><code>"validate-if-schema"</code></dt>
* <dd>
* <dl>
* <dt><code>true</code></dt>
- * <dd>[optional]Enable
- * validation only if a declaration for the document element can be found
- * (independently of where it is found, i.e. XML schema, DTD, or any other
- * type or representation of schema). If validation errors are found, the
- * error handler is notified. Note also that no datatype normalization (i.e.
- * non-XML 1.0 normalization) is done according to the schema used unless
- * the feature <code>datatype-normalization</code> is <code>true</code>.
- * <code>validate-if-schema</code> and <code>validate</code> are mutually
- * exclusive, setting one of them to <code>true</code> will set the other
- * one to <code>false</code>. </dd>
- * <dt><code>false</code></dt>
- * <dd>[required] (default)No
- * validation should be performed if the document has a schema. Note that
- * validation must still happen if <code>validate</code> is <code>true</code>
- * . </dd>
+ * <dd>[<em>optional</em>]Enable validation only if a declaration for the document element can be
+ * found (independently of where it is found, i.e. XML schema, DTD, or any
+ * other type or representation of schema). If validation errors are found,
+ * the error handler is notified. Note also that normalized values will not
+ * be exposed to the schema in used unless the feature
+ * <code>datatype-normalization</code> is <code>true</code>.
+ * <p ><b>Note:</b> <code>validate-if-schema</code> and <code>validate</code>
+ * are mutually exclusive, setting one of them to <code>true</code> will set
+ * the other one to <code>false</code>. </dd>
+ * <dt><code>false</code></dt>
+ * <dd>[<em>required</em>] (<em>default</em>)No validation should be performed if the document has a schema. Note
+ * that validation must still happen if <code>validate</code> is
+ * <code>true</code>. </dd>
* </dl></dd>
* <dt><code>"whitespace-in-element-content"</code></dt>
* <dd>
* <dl>
- * <dt><code>true</code></dt>
- * <dd>[required]
- * (default)Keep all white spaces in the document. How does this feature
- * interact with <code>"validate"</code> and
+ * <dt>
+ * <code>true</code></dt>
+ * <dd>[<em>required</em>] (<em>default</em>)Keep all white spaces in the document. How does this feature interact
+ * with <code>"validate"</code> and
* <code>Text.isWhitespaceInElementContent</code>. issue no longer relevant
* (f2f october 2002).</dd>
* <dt><code>false</code></dt>
- * <dd>[optional]Discard white space in
- * element content while normalizing. The implementation is expected to use
- * the <code>isWhitespaceInElementContent</code> flag on <code>Text</code>
- * nodes to determine if a text node should be written out or not.</dd>
+ * <dd>[<em>optional</em>]Discard white space in element content while normalizing. The
+ * implementation is expected to use the
+ * <code>isWhitespaceInElementContent</code> flag on <code>Text</code> nodes
+ * to determine if a text node should be written out or not.</dd>
* </dl></dd>
* </dl>
* <p> The resolutions of entities is done using <code>Document.baseURI</code>
- * . However, when the features "LS-Load" or "LS-Save" defined in [<a href='http://www.w3.org/TR/DOM-Level-3-LS'>DOM Level 3 Load and Save</a>] are
- * supported by the DOM implementation, the parameter
+ * . However, when the features "LS-Load" or "LS-Save" defined in [<a href='http://www.w3.org/TR/DOM-Level-3-LS'>DOM Level 3 Load and Save</a>]
+ * are supported by the DOM implementation, the parameter
* <code>"entity-resolver"</code> can also be used on
* <code>DOMConfiguration</code> objects attached to <code>Document</code>
* nodes. If this parameter is set, <code>Document.normalizeDocument</code>
* will invoke the entity resolver instead of using
* <code>Document.baseURI</code>.
- * <p>See also the <a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20021022'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface DOMConfiguration {
1.4 +28 -27 xml-xerces/java/src/dom3/org/w3c/dom/DOMError.java
Index: DOMError.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/DOMError.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DOMError.java 17 Jan 2003 22:41:37 -0000 1.3
+++ DOMError.java 20 Mar 2003 00:38:28 -0000 1.4
@@ -1,28 +1,30 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
+ *
* <code>DOMError</code> is an interface that describes an error.
- * <p>See also the <a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * @since DOM Level 3
*/
public interface DOMError {
+ // ErrorSeverity
/**
* The severity of the error described by the <code>DOMError</code> is
* warning
@@ -38,6 +40,7 @@
* fatal error
*/
public static final short SEVERITY_FATAL_ERROR = 2;
+
/**
* The severity of the error, either <code>SEVERITY_WARNING</code>,
* <code>SEVERITY_ERROR</code>, or <code>SEVERITY_FATAL_ERROR</code>.
@@ -50,33 +53,31 @@
public String getMessage();
/**
- * The related platform dependent exception if any.exception is a reserved
- * word, we need to rename it.Change to "relatedException". (F2F 26 Sep
- * 2001)
- */
- public Object getRelatedException();
-
- /**
* A <code>DOMString</code> indicating which related data is expected in
* <code>relatedData</code>. Users should refer to the specification of
* the error in order to find its <code>DOMString</code> type and
- * <code>relatedData</code> definitions if any. As an example, [<a href='http://www.w3.org/TR/DOM-Level-3-LS'>DOM Level 3 Load and Save</a>] does
- * not keep the [baseURI] property defined on a Processing Instruction
- * information item. Therefore, the <code>DOMBuilder</code> generates a
- * <code>SEVERITY_WARNING</code> with <code>type</code>
+ * <code>relatedData</code> definitions if any.
+ * <p ><b>Note:</b> As an example, [<a href='http://www.w3.org/TR/DOM-Level-3-LS'>DOM Level 3 Load and Save</a>]
+ * does not keep the [baseURI] property defined on a Processing
+ * Instruction information item. Therefore, the <code>DOMBuilder</code>
+ * generates a <code>SEVERITY_WARNING</code> with <code>type</code>
* <code>"infoset-baseURI"</code> and the lost [baseURI] property
* represented as a <code>DOMString</code> in the
* <code>relatedData</code> attribute.
*/
-
public String getType();
-
+
/**
- * The related <code>Error.type</code> dependent data if any.
+ * The related platform dependent exception if any.exception is a reserved
+ * word, we need to rename it.Change to "relatedException". (F2F 26 Sep
+ * 2001)
*/
+ public Object getRelatedException();
+ /**
+ * The related <code>DOMError.type</code> dependent data if any.
+ */
public Object getRelatedData();
-
/**
* The location of the error.
1.3 +13 -12 xml-xerces/java/src/dom3/org/w3c/dom/DOMErrorHandler.java
Index: DOMErrorHandler.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/DOMErrorHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DOMErrorHandler.java 19 Jun 2002 22:27:10 -0000 1.2
+++ DOMErrorHandler.java 20 Mar 2003 00:38:28 -0000 1.3
@@ -1,24 +1,24 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
+ *
* <code>DOMErrorHandler</code> is a callback interface that the DOM
* implementation can call when reporting errors that happens while
* processing XML data, or when doing some other processing (e.g. validating
@@ -27,7 +27,8 @@
* implement this interface.How does one register an error handler in the
* core? Passed as an argument to super-duper-normalize or registered on the
* DOMImplementation?Document interface has an attribute errorHandler.
- * <p>See also the <a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * @since DOM Level 3
*/
public interface DOMErrorHandler {
/**
1.3 +15 -18 xml-xerces/java/src/dom3/org/w3c/dom/DOMException.java
Index: DOMException.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/DOMException.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DOMException.java 19 Jun 2002 22:27:10 -0000 1.2
+++ DOMException.java 20 Mar 2003 00:38:28 -0000 1.3
@@ -1,24 +1,24 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
+ *
* 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).
@@ -34,7 +34,7 @@
* 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/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public class DOMException extends RuntimeException {
public DOMException(short code, String message) {
@@ -61,10 +61,7 @@
*/
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.
+ * If an invalid or illegal character is specified, such as in a name. See <a href='http://www.w3.org/TR/2000/REC-xml-20001006#NT-Char'>production 2</a> in the XML specification for the definition of a legal character, and <a href='http://www.w3.org/TR/2000/REC-xml-20001006#NT-Name'>production 5</a> for the definition of a legal name character.
*/
public static final short INVALID_CHARACTER_ERR = 5;
/**
@@ -123,8 +120,8 @@
* If a call to a method such as <code>insertBefore</code> or
* <code>removeChild</code> would make the <code>Node</code> invalid
* with respect to "partial validity", this exception would be raised
- * and the operation would not be done. This code is used in . Refer to
- * this specification for further information.
+ * and the operation would not be done. This code is used in [<a href='http://www.w3.org/TR/DOM-Level-3-Val'>DOM Level 3 Validation</a>].
+ * Refer to this specification for further information.
* @since DOM Level 3
*/
public static final short VALIDATION_ERR = 16;
1.3 +52 -50 xml-xerces/java/src/dom3/org/w3c/dom/DOMImplementation.java
Index: DOMImplementation.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/DOMImplementation.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DOMImplementation.java 19 Jun 2002 22:27:10 -0000 1.2
+++ DOMImplementation.java 20 Mar 2003 00:38:28 -0000 1.3
@@ -1,28 +1,28 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
+ *
* 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/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface DOMImplementation {
/**
@@ -47,9 +47,7 @@
/**
* 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>.
+ * default attribute additions do not occur..
* @param qualifiedName The qualified name of the document type to be
* created.
* @param publicId The external subset public identifier.
@@ -61,12 +59,9 @@
* contains an illegal character.
* <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
* malformed.
- * <br>NOT_SUPPORTED_ERR: May be raised by DOM implementations which do
- * not support the <code>"XML"</code> feature, if they choose not to
- * support this method. Other features introduced in the future, by
- * the DOM WG or in extensions defined by other groups, may also
- * demand support for this method; please consult the definition of
- * the feature to see if it requires this method.
+ * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature "XML" and the language exposed through the
+ * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
public DocumentType createDocumentType(String qualifiedName,
@@ -80,12 +75,13 @@
* <br>Note that based on the <code>DocumentType</code> given to create
* the document, the implementation may instantiate specialized
* <code>Document</code> objects that support additional features than
- * the "Core", such as "HTML" . On the other hand, setting the
- * <code>DocumentType</code> after the document was created makes this
- * very unlikely to happen. Alternatively, specialized
- * <code>Document</code> creation methods, such as
- * <code>createHTMLDocument</code> , can be used to obtain specific
- * types of <code>Document</code> objects.
+ * the "Core", such as "HTML" [<a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>DOM Level 2 HTML</a>]
+ * . On the other hand, setting the <code>DocumentType</code> after the
+ * document was created makes this very unlikely to happen.
+ * Alternatively, specialized <code>Document</code> creation methods,
+ * such as <code>createHTMLDocument</code> [<a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>DOM Level 2 HTML</a>]
+ * , can be used to obtain specific types of <code>Document</code>
+ * objects.
* @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
@@ -107,20 +103,17 @@
* <code>qualifiedName</code> is <code>null</code> and the
* <code>namespaceURI</code> is different from <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" , or if the DOM
- * implementation does not support the <code>"XML"</code> feature but
- * a non-null namespace URI was provided, since namespaces were
- * defined by XML.
+ * the <code>namespaceURI</code> is different from "<a href='http://www.w3.org/XML/1998/namespace'>
+ * http://www.w3.org/XML/1998/namespace</a>" [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+ * , or if the DOM implementation does not support the
+ * <code>"XML"</code> feature but a non-null namespace URI was
+ * provided, since namespaces were defined by XML.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>doctype</code> has already
* been used with a different document or was created from a different
* implementation.
- * <br>NOT_SUPPORTED_ERR: May be raised by DOM implementations which do
- * not support the "XML" feature, if they choose not to support this
- * method. Other features introduced in the future, by the DOM WG or
- * in extensions defined by other groups, may also demand support for
- * this method; please consult the definition of the feature to see if
- * it requires this method.
+ * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature "XML" and the language exposed through the
+ * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
public Document createDocument(String namespaceURI,
@@ -129,20 +122,29 @@
throws DOMException;
/**
- * This method makes available a <code>DOMImplementation</code>'s
- * specialized interface (see ).
+ * This method returns a specialized object which implements the
+ * specialized APIs of the specified feature and version. The
+ * specialized object may also be obtained by using binding-specific
+ * casting methods but is not necessarily expected to, as discussed in .
+ * This method also allow the implementation to provide specialized
+ * objects which do not support the <code>DOMImplementation</code>
+ * interface.
* @param feature The name of the feature requested (case-insensitive).
- * @return Returns an alternate <code>DOMImplementation</code> which
- * implements the specialized APIs of the specified feature, if any,
- * or <code>null</code> if there is no alternate
- * <code>DOMImplementation</code> object which implements interfaces
- * associated with that feature. Any alternate
- * <code>DOMImplementation</code> returned by this method must
- * delegate to the primary core <code>DOMImplementation</code> and not
- * return results inconsistent with the primary
- * <code>DOMImplementation</code>
+ * @param version This is the version number of the feature to test. If
+ * the version is <code>null</code> or the empty string, supporting
+ * any version of the feature will cause the method to return an
+ * object that supports at least one version of the feature.
+ * @return Returns an object which implements the specialized APIs of
+ * the specified feature and version, if any, or <code>null</code> if
+ * there is no object which implements interfaces associated with that
+ * feature. If the <code>DOMObject</code> returned by this method
+ * implements the <code>DOMImplementation</code> interface, it must
+ * delegate to the primary core <code>Node</code> and not return
+ * results inconsistent with the primary core <code>Node</code> such
+ * as attributes, childNodes, etc.
* @since DOM Level 3
*/
- public DOMImplementation getInterface(String feature);
+ public Node getFeature(String feature,
+ String version);
}
1.3 +29 -15 xml-xerces/java/src/dom3/org/w3c/dom/DOMImplementationSource.java
Index: DOMImplementationSource.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/DOMImplementationSource.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DOMImplementationSource.java 19 Jun 2002 22:27:10 -0000 1.2
+++ DOMImplementationSource.java 20 Mar 2003 00:38:28 -0000 1.3
@@ -1,41 +1,55 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
+ *
* This interface permits a DOM implementer to supply one or more
* implementations, based upon requested features. Each implemented
* <code>DOMImplementationSource</code> object is listed in the
* binding-specific list of available sources so that its
* <code>DOMImplementation</code> objects are made available.
- * <p>See also the <a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * @since DOM Level 3
*/
public interface DOMImplementationSource {
/**
- * A method to request a DOM implementation.
+ * A method to request the first DOM implementation that support the
+ * specified features.
* @param features A string that specifies which features are required.
* This is a space separated list in which each feature is specified
* by its name optionally followed by a space and a version number.
* This is something like: "XML 1.0 Traversal Events 2.0"
- * @return An implementation that has the desired features, or
- * <code>null</code> if this source has none.
+ * @return The first DOM implementation that support the desired
+ * features, or <code>null</code> if this source has none.
*/
public DOMImplementation getDOMImplementation(String features);
+
+ /**
+ * A method to request a list of DOM implementations that support the
+ * specified features.
+ * @param features A string that specifies which features are required.
+ * This is a space separated list in which each feature is specified
+ * by its name optionally followed by a space and a version number.
+ * This is something like: "XML 1.0 Traversal Events 2.0"
+ * @return A list of DOM implementations that support the desired
+ * features.
+ */
+ public DOMImplementationList getDOMImplementations(String features);
}
1.3 +27 -25 xml-xerces/java/src/dom3/org/w3c/dom/DOMLocator.java
Index: DOMLocator.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/DOMLocator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DOMLocator.java 19 Jun 2002 22:27:10 -0000 1.2
+++ DOMLocator.java 20 Mar 2003 00:38:28 -0000 1.3
@@ -1,58 +1,60 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
+ *
* <code>DOMLocator</code> is an interface that describes a location (e.g.
* where an error occured).
- * <p>See also the <a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * @since DOM Level 3
*/
public interface DOMLocator {
/**
- * The line number where the error occured, or -1 if there is no line
- * number available.
+ * The line number this locator is pointing to, or <code>-1</code> if
+ * there is no column number available.
*/
public int getLineNumber();
/**
- * The column number where the error occured, or -1 if there is no column
- * number available.
+ * The column number this locator is pointing to, or <code>-1</code> if
+ * there is no column number available.
*/
public int getColumnNumber();
/**
- * The byte or character offset into the input source, if we're parsing a
- * file or a byte stream then this will be the byte offset into that
- * stream, but if a character media is parsed then the offset will be
- * the character offset. The value is <code>-1</code> if there is no
- * offset available.
+ * The byte or character offset into the input source this locator is
+ * pointing to. If the input source is a file or a byte stream then this
+ * is the byte offset into that stream, but if the input source is a
+ * character media then the offset is the character offset. The value is
+ * <code>-1</code> if there is no offset available.
*/
public int getOffset();
/**
- * The DOM Node where the error occured, or null if there is no Node
- * available.
+ * The node this locator is pointing to, or <code>null</code> if no node
+ * is available.
*/
- public Node getErrorNode();
+ public Node getRelatedNode();
/**
- * The URI where the error occured, or null if there is no URI available.
+ * The URI this locator is pointing to, or <code>null</code> if no URI is
+ * available.
*/
public String getUri();
1.4 +192 -170 xml-xerces/java/src/dom3/org/w3c/dom/Document.java
Index: Document.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/Document.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Document.java 11 Dec 2002 16:17:01 -0000 1.3
+++ Document.java 20 Mar 2003 00:38:28 -0000 1.4
@@ -1,24 +1,24 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
+ *
* 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.
@@ -28,7 +28,7 @@
* 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/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface Document extends Node {
/**
@@ -43,9 +43,10 @@
* <code>replaceChild</code>. Note, however, that while some
* implementations may instantiate different types of
* <code>Document</code> objects supporting additional features than the
- * "Core", such as "HTML" , based on the <code>DocumentType</code>
- * specified at creation time, changing it afterwards is very unlikely
- * to result in a change of the features supported.
+ * "Core", such as "HTML" [<a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>DOM Level 2 HTML</a>]
+ * , based on the <code>DocumentType</code> specified at creation time,
+ * changing it afterwards is very unlikely to result in a change of the
+ * features supported.
* @version DOM Level 3
*/
public DocumentType getDoctype();
@@ -60,7 +61,8 @@
* This is a convenience attribute that allows direct access to the child
* node that is the document element of the document.
* <br> This attribute represents the property [document element] defined
- * in .
+ * in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
*/
public Element getDocumentElement();
@@ -156,12 +158,13 @@
* 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 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
- * resolve namespace prefixes.
+ * corresponding <code>Entity</code> node.
+ * <p ><b>Note:</b> 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 and
+ * 3 do not support any mechanism to resolve namespace prefixes in this
+ * case.
* @param name The name of the entity to reference.
* @return The new <code>EntityReference</code> object.
* @exception DOMException
@@ -173,8 +176,9 @@
throws DOMException;
/**
- * Returns a <code>NodeList</code> of all the <code>Elements</code> with a
- * given tag name in document order.
+ * Returns a <code>NodeList</code> of all the <code>Elements</code> in
+ * document order with a given tag name and are contained in the
+ * document.
* @param tagname The name of the tag to match on. The special value "*"
* matches all tags. For XML, this is case-sensitive, otherwise it
* depends on the case-sentivity of the markup language in use.
@@ -229,12 +233,11 @@
* <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
+ * <dd><em>Specified</em> 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 <em>not</em> 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>
@@ -289,8 +292,8 @@
* NOT_SUPPORTED_ERR: Raised if the type of node being imported is not
* supported.
* <br>INVALID_CHARACTER_ERR: Raised if one the imported names contain
- * an illegal character. This may happen when importing an XML 1.1
- * element into an XML 1.0 document, for instance.
+ * an illegal character. This may happen when importing an XML 1.1 [<a href='http://www.w3.org/TR/2002/CR-xml11-20021015/'>XML 1.1</a>] element
+ * into an XML 1.0 document, for instance.
* @since DOM Level 2
*/
public Node importNode(Node importedNode,
@@ -299,8 +302,9 @@
/**
* Creates an element of the given qualified name and namespace URI.
- * <br>Per , applications must use the value null as the namespaceURI
- * parameter for methods if they wish to have no namespace.
+ * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+ * , applications must use the value <code>null</code> as the
+ * namespaceURI parameter for methods if they wish to have no namespace.
* @param namespaceURI The namespace URI of the element to create.
* @param qualifiedName The qualified name of the element type to
* instantiate.
@@ -339,15 +343,16 @@
* </tr>
* </table>
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified qualified name
- * contains an illegal character, per the XML 1.0 specification .
- * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
- * malformed per the Namespaces in XML specification, if the
- * <code>qualifiedName</code> has a prefix and the
- * <code>namespaceURI</code> is <code>null</code>, or if the
- * <code>qualifiedName</code> has a prefix that is "xml" and the
- * <code>namespaceURI</code> is different from "
- * http://www.w3.org/XML/1998/namespace" .
+ * INVALID_CHARACTER_ERR: Raised if the specified
+ * <code>qualifiedName</code> contains an illegal character.
+ * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is a
+ * malformed qualified name, 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 "<a href='http://www.w3.org/XML/1998/namespace'>
+ * http://www.w3.org/XML/1998/namespace</a>" [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+ * , or if the <code>qualifiedName</code> or its prefix is "xmlns" and
+ * the <code>namespaceURI</code> is different from "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>", or if the <code>namespaceURI</code> is "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>" and neither the <code>qualifiedName</code> nor its prefix is "xmlns".
* <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
* support the <code>"XML"</code> feature, since namespaces were
* defined by XML.
@@ -359,8 +364,10 @@
/**
* Creates an attribute of the given qualified name and namespace URI.
- * <br>Per , applications must use the value null as the namespaceURI
- * parameter for methods if they wish to have no namespace.
+ * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+ * , applications must use the value <code>null</code> as the
+ * <code>namespaceURI</code> parameter for methods if they wish to have
+ * no namespace.
* @param namespaceURI The namespace URI of the attribute to create.
* @param qualifiedName The qualified name of the attribute to
* instantiate.
@@ -404,18 +411,15 @@
* </tr>
* </table>
* @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified qualified name
- * contains an illegal character, per the XML 1.0 specification .
- * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
- * malformed per the Namespaces in XML specification, if the
- * <code>qualifiedName</code> has a prefix and the
- * <code>namespaceURI</code> is <code>null</code>, if the
- * <code>qualifiedName</code> has a prefix that is "xml" and the
- * <code>namespaceURI</code> is different from "
- * http://www.w3.org/XML/1998/namespace", or if the
- * <code>qualifiedName</code>, or its prefix, is "xmlns" and the
- * <code>namespaceURI</code> is different from "
- * http://www.w3.org/2000/xmlns/".
+ * INVALID_CHARACTER_ERR: Raised if the specified
+ * <code>qualifiedName</code> contains an illegal character.
+ * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is a
+ * malformed qualified name, if the <code>qualifiedName</code> has a
+ * prefix and the <code>namespaceURI</code> is <code>null</code>, if
+ * the <code>qualifiedName</code> has a prefix that is "xml" and the
+ * <code>namespaceURI</code> is different from "<a href='http://www.w3.org/XML/1998/namespace'>
+ * http://www.w3.org/XML/1998/namespace</a>", if the <code>qualifiedName</code> or its prefix is "xmlns" and the
+ * <code>namespaceURI</code> is different from "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>", or if the <code>namespaceURI</code> is "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>" and neither the <code>qualifiedName</code> nor its prefix is "xmlns".
* <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
* support the <code>"XML"</code> feature, since namespaces were
* defined by XML.
@@ -429,7 +433,7 @@
* Returns a <code>NodeList</code> of all the <code>Elements</code> with a
* given local name and namespace URI in document order.
* @param namespaceURI The namespace URI of the elements to match on. The
- * special value "*" matches all namespaces.
+ * special value <code>"*"</code> matches all namespaces.
* @param localName The local name of the elements to match on. The
* special value "*" matches all local names.
* @return A new <code>NodeList</code> object containing all the matched
@@ -440,16 +444,20 @@
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>.
+ * Returns the <code>Element</code> that has an ID attribute with the
+ * given value. If no such element exists, this returns <code>null</code>
+ * . If more than one element has an ID attribute with that value, what
+ * is returned is undefined.
+ * <br>The DOM implementation needs to have information that says which
+ * attributes are of type ID. This information can come from validating
+ * the document against a grammar or from the use of the
+ * <code>setIdAttribute</code> method and its siblings on
+ * <code>Element</code>. To query whether an attribute is of type ID see
+ * <code>isId</code> on <code>Attr</code>.
+ * <p ><b>Note:</b> Attributes with the name "ID" or "id" are not of type
+ * ID unless so defined.
* @param elementId The unique <code>id</code> value for an element.
- * @return The matching element.
+ * @return The matching element or <code>null</code> if there is none.
* @since DOM Level 2
*/
public Element getElementById(String elementId);
@@ -458,7 +466,8 @@
* An attribute specifying the actual encoding of this document. This is
* <code>null</code> otherwise.
* <br> This attribute represents the property [character encoding scheme]
- * defined in .
+ * defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
* @since DOM Level 3
*/
public String getActualEncoding();
@@ -466,7 +475,8 @@
* An attribute specifying the actual encoding of this document. This is
* <code>null</code> otherwise.
* <br> This attribute represents the property [character encoding scheme]
- * defined in .
+ * defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
* @since DOM Level 3
*/
public void setActualEncoding(String actualEncoding);
@@ -487,14 +497,16 @@
/**
* An attribute specifying, as part of the XML declaration, whether this
* document is standalone.
- * <br> This attribute represents the property [standalone] defined in .
+ * <br> This attribute represents the property [standalone] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
* @since DOM Level 3
*/
public boolean getStandalone();
/**
* An attribute specifying, as part of the XML declaration, whether this
* document is standalone.
- * <br> This attribute represents the property [standalone] defined in .
+ * <br> This attribute represents the property [standalone] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
* @since DOM Level 3
*/
public void setStandalone(boolean standalone);
@@ -502,17 +514,16 @@
/**
* An attribute specifying, as part of the XML declaration, the version
* number of this document. This is <code>null</code> when unspecified.
- * <br> This attribute represents the property [version] defined in .
- * @exception DOMException
- * NOT_SUPPORTED_ERR: Raised if the version is set to a value that is
- * not supported by this <code>Document</code>.
+ * <br> This attribute represents the property [version] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
* @since DOM Level 3
*/
public String getVersion();
/**
* An attribute specifying, as part of the XML declaration, the version
* number of this document. This is <code>null</code> when unspecified.
- * <br> This attribute represents the property [version] defined in .
+ * <br> This attribute represents the property [version] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
* @exception DOMException
* NOT_SUPPORTED_ERR: Raised if the version is set to a value that is
* not supported by this <code>Document</code>.
@@ -522,22 +533,20 @@
throws DOMException;
/**
- * An attribute specifying whether errors checking is enforced or not.
- * When set to <code>false</code>, the implementation is free to not
- * test every possible error case normally defined on DOM operations,
- * and not raise any <code>DOMException</code>. In case of error, the
- * behavior is undefined. This attribute is <code>true</code> by
- * defaults.
+ * An attribute specifying whether error checking is enforced or not. When
+ * set to <code>false</code>, the implementation is free to not test
+ * every possible error case normally defined on DOM operations, and not
+ * raise any <code>DOMException</code>. In case of error, the behavior
+ * is undefined. This attribute is <code>true</code> by default.
* @since DOM Level 3
*/
public boolean getStrictErrorChecking();
/**
- * An attribute specifying whether errors checking is enforced or not.
- * When set to <code>false</code>, the implementation is free to not
- * test every possible error case normally defined on DOM operations,
- * and not raise any <code>DOMException</code>. In case of error, the
- * behavior is undefined. This attribute is <code>true</code> by
- * defaults.
+ * An attribute specifying whether error checking is enforced or not. When
+ * set to <code>false</code>, the implementation is free to not test
+ * every possible error case normally defined on DOM operations, and not
+ * raise any <code>DOMException</code>. In case of error, the behavior
+ * is undefined. This attribute is <code>true</code> by default.
* @since DOM Level 3
*/
public void setStrictErrorChecking(boolean strictErrorChecking);
@@ -545,16 +554,18 @@
/**
* The location of the document or <code>null</code> if undefined.
* <br>Beware that when the <code>Document</code> supports the feature
- * "HTML" , the href attribute of the HTML BASE element takes precedence
- * over this attribute.
+ * "HTML" [<a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>DOM Level 2 HTML</a>]
+ * , the href attribute of the HTML BASE element takes precedence over
+ * this attribute.
* @since DOM Level 3
*/
public String getDocumentURI();
/**
* The location of the document or <code>null</code> if undefined.
* <br>Beware that when the <code>Document</code> supports the feature
- * "HTML" , the href attribute of the HTML BASE element takes precedence
- * over this attribute.
+ * "HTML" [<a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>DOM Level 2 HTML</a>]
+ * , the href attribute of the HTML BASE element takes precedence over
+ * this attribute.
* @since DOM Level 3
*/
public void setDocumentURI(String documentURI);
@@ -583,37 +594,37 @@
* <dd><code>DocumentType</code> nodes cannot
* be adopted.</dd>
* <dt>ELEMENT_NODE</dt>
- * <dd>Specified attribute nodes of the source
- * element are adopted, and the generated <code>Attr</code> nodes.
- * Default attributes are discarded, though if the document being
- * adopted into defines default attributes for this element name, those
- * are assigned. The descendants of the source element are recursively
- * adopted.</dd>
+ * <dd><em>Specified</em> attribute nodes of the source element are adopted, and the generated
+ * <code>Attr</code> nodes. Default attributes are discarded, though if
+ * the document being adopted into defines default attributes for this
+ * element name, those are assigned. The descendants of the source
+ * element are recursively adopted.</dd>
* <dt>ENTITY_NODE</dt>
- * <dd><code>Entity</code> nodes cannot be adopted.</dd>
+ * <dd><code>Entity</code> nodes
+ * cannot be adopted.</dd>
+ * <dt>ENTITY_REFERENCE_NODE</dt>
+ * <dd>Only the
+ * <code>EntityReference</code> node itself is adopted, the descendants
+ * are discarded, 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_REFERENCE_NODE</dt>
- * <dd>Only the <code>EntityReference</code> node
- * itself is adopted, the descendants are discarded, 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 cannot be adopted.</dd>
- * <dt>PROCESSING_INSTRUCTION_NODE, TEXT_NODE,
- * CDATA_SECTION_NODE, COMMENT_NODE</dt>
- * <dd>These nodes can all be adopted. No
- * specifics.</dd>
- * </dl> Should this method simply return null when it fails? How
- * "exceptional" is failure for this method?Stick with raising
- * exceptions only in exceptional circumstances, return null on failure
- * (F2F 19 Jun 2000).Can an entity node really be adopted?No, neither
- * can Notation nodes (Telcon 13 Dec 2000).Does this affect keys and
- * hashCode's of the adopted subtree nodes?If so, what about
- * readonly-ness of key and hashCode?if not, would appendChild affect
- * keys/hashCodes or would it generate exceptions if key's are duplicate?
- * Both keys and hashcodes have been dropped.
+ * NOTATION_NODE</dt>
+ * <dd><code>Notation</code> nodes cannot be adopted.</dd>
+ * <dt>
+ * PROCESSING_INSTRUCTION_NODE, TEXT_NODE, CDATA_SECTION_NODE,
+ * COMMENT_NODE</dt>
+ * <dd>These nodes can all be adopted. No specifics.</dd>
+ * </dl> Should this
+ * method simply return null when it fails? How "exceptional" is failure
+ * for this method?Stick with raising exceptions only in exceptional
+ * circumstances, return null on failure (F2F 19 Jun 2000).Can an entity
+ * node really be adopted?No, neither can Notation nodes (Telcon 13 Dec
+ * 2000).Does this affect keys and hashCode's of the adopted subtree
+ * nodes?If so, what about readonly-ness of key and hashCode?if not,
+ * would appendChild affect keys/hashCodes or would it generate
+ * exceptions if key's are duplicate?Both keys and hashcodes have been
+ * dropped.
* @param source The node to move into this document.
* @return The adopted node, or <code>null</code> if this operation
* fails, such as when the source node comes from a different
@@ -629,17 +640,23 @@
throws DOMException;
/**
+ * The configuration used when <code>Document.normalizeDocument</code> is
+ * invoked.
+ * @since DOM Level 3
+ */
+ public DOMConfiguration getConfig();
+
+ /**
* This method acts as if the document was going through a save and load
* cycle, putting the document in a "normal" form. The actual result
* depends on the features being set and governing what operations
- * actually take place. See <code>setNormalizationFeature</code> for
- * details.
+ * actually take place. See <code>DOMConfiguration</code> for details.
* <br>Noticeably this method normalizes <code>Text</code> nodes, makes
* the document "namespace wellformed", according to the algorithm
- * described below in pseudo code, by adding missing namespace
- * declaration attributes and adding or changing namespace prefixes,
- * updates the replacement tree of <code>EntityReference</code> nodes,
- * normalizes attribute values, etc.
+ * described in , by adding missing namespace declaration attributes and
+ * adding or changing namespace prefixes, updates the replacement tree
+ * of <code>EntityReference</code> nodes, normalizes attribute values,
+ * etc.
* <br>Mutation events, when supported, are generated to reflect the
* changes occuring on the document.
* <br>See for details on how namespace declaration attributes and
@@ -663,65 +680,70 @@
public void normalizeDocument();
/**
- * The configuration used when <code>Document.normalizeDocument</code> is
- * invoked.
- * @since DOM Level 3
- */
- public DOMConfiguration getConfig();
-
-
- /**
- * Rename an existing node. When possible this simply changes the name of
- * the given node, otherwise this creates a new node with the specified
- * name and replaces the existing node with the new node as described
- * below. This only applies to nodes of type <code>ELEMENT_NODE</code>
- * and <code>ATTRIBUTE_NODE</code>.
- * <br>When a new node is created, the following operations are performed:
- * the new node is created, any registered event listener is registered
- * on the new node, any user data attached to the old node is removed
- * from that node, the old node is removed from its parent if it has
- * one, the children are moved to the new node, if the renamed node is
- * an <code>Element</code> its attributes are moved to the new node, the
- * new node is inserted at the position the old node used to have in its
- * parent's child nodes list if it has one, the user data that was
- * attached to the old node is attach to the new node, the user data
- * event <code>NODE_RENAMED</code> is fired.
+ * Rename an existing node of type <code>ELEMENT_NODE</code> or
+ * <code>ATTRIBUTE_NODE</code>.
+ * <br>When possible this simply changes the name of the given node,
+ * otherwise this creates a new node with the specified name and
+ * replaces the existing node with the new node as described below.
+ * <br>If simply changing the name of the given node is not possible, the
+ * following operations are performed: a new node is created, any
+ * registered event listener is registered on the new node, any user
+ * data attached to the old node is removed from that node, the old node
+ * is removed from its parent if it has one, the children are moved to
+ * the new node, if the renamed node is an <code>Element</code> its
+ * attributes are moved to the new node, the new node is inserted at the
+ * position the old node used to have in its parent's child nodes list
+ * if it has one, the user data that was attached to the old node is
+ * attached to the new node.
+ * <br>When the node being renamed is an <code>Element</code> only the
+ * specified attributes are moved, default attributes originated from
+ * the DTD are updated according to the new element name. In addition,
+ * the implementation may update default attributes from other schemas.
+ * Applications should use normalizeDocument() to guarantee these
+ * attributes are up-to-date.
* <br>When the node being renamed is an <code>Attr</code> that is
* attached to an <code>Element</code>, the node is first removed from
* the <code>Element</code> attributes map. Then, once renamed, either
* by modifying the existing node or creating a new one as described
* above, it is put back.
- * <br>In addition, when the implementation supports the feature
- * "MutationEvents", each mutation operation involved in this method
- * fires the appropriate event, and in the end the event
- * <code>ElementNameChanged</code> or <code>AttributeNameChanged</code>
- * is fired.Should this throw a HIERARCHY_REQUEST_ERR?No. (F2F 28 Feb
- * 2002).
+ * <br>In addition,
+ * <ul>
+ * <li> a user data event <code>NODE_RENAMED</code> is fired,
+ * </li>
+ * <li>
+ * when the implementation supports the feature "MutationEvents", each
+ * mutation operation involved in this method fires the appropriate
+ * event, and in the end the event <code>DOMElementNameChanged</code> or
+ * <code>DOMAttributeNameChanged</code> is fired.
+ * </li>
+ * </ul>Should this throw a
+ * HIERARCHY_REQUEST_ERR?No. (F2F 28 Feb 2002).
* @param n The node to rename.
- * @param namespaceURI The new namespaceURI.
- * @param name The new qualified name.
+ * @param namespaceURI The new namespace URI.
+ * @param qualifiedName The new qualified name.
* @return The renamed node. This is either the specified node or the new
* node that was created to replace the specified node.
* @exception DOMException
* NOT_SUPPORTED_ERR: Raised when the type of the specified node is
- * neither <code>ELEMENT_NODE</code> nor <code>ATTRIBUTE_NODE</code>.
+ * neither <code>ELEMENT_NODE</code> nor <code>ATTRIBUTE_NODE</code>,
+ * or if the implementation does not support the renaming of the
+ * document element.
* <br>WRONG_DOCUMENT_ERR: Raised when the specified node was created
* from a different document than this document.
- * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
- * malformed per the Namespaces in XML specification, if the
- * <code>qualifiedName</code> has a prefix and the
- * <code>namespaceURI</code> is <code>null</code>, or if the
- * <code>qualifiedName</code> has a prefix that is "xml" and the
- * <code>namespaceURI</code> is different from "
- * http://www.w3.org/XML/1998/namespace" . Also raised, when the node
- * being renamed is an attribute, if the <code>qualifiedName</code>,
- * or its prefix, is "xmlns" and the <code>namespaceURI</code> is
- * different from "http://www.w3.org/2000/xmlns/".
+ * <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is a
+ * malformed qualified name, 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 "<a href='http://www.w3.org/XML/1998/namespace'>
+ * http://www.w3.org/XML/1998/namespace</a>" [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+ * . Also raised, when the node being renamed is an attribute, if the
+ * <code>qualifiedName</code>, or its prefix, is "xmlns" and the
+ * <code>namespaceURI</code> is different from "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>".
* @since DOM Level 3
*/
public Node renameNode(Node n,
String namespaceURI,
- String name)
+ String qualifiedName)
throws DOMException;
}
1.3 +17 -16 xml-xerces/java/src/dom3/org/w3c/dom/DocumentFragment.java
Index: DocumentFragment.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/DocumentFragment.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DocumentFragment.java 19 Jun 2002 22:27:10 -0000 1.2
+++ DocumentFragment.java 20 Mar 2003 00:38:28 -0000 1.3
@@ -1,24 +1,24 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
+ *
* <code>DocumentFragment</code> is a "lightweight" or "minimal"
* <code>Document</code> object. It is very common to want to be able to
* extract a portion of a document's tree or to create a new fragment of a
@@ -52,11 +52,12 @@
* <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>.
- * The properties [notations] and [unparsed entities] defined by the
- * Document Information Item in are accessible through the
- * <code>DocumentType</code> interface. The property [all declarations
- * processed] is not accessible through the DOM API.
- * <p>See also the <a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <p ><b>Note:</b> The properties [notations] and [unparsed entities]
+ * defined by the Document Information Item in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * are accessible through the <code>DocumentType</code> interface. The
+ * property [all declarations processed] is not accessible through the DOM
+ * API.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface DocumentFragment extends Node {
}
1.3 +27 -21 xml-xerces/java/src/dom3/org/w3c/dom/DocumentType.java
Index: DocumentType.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/DocumentType.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DocumentType.java 19 Jun 2002 22:27:10 -0000 1.2
+++ DocumentType.java 20 Mar 2003 00:38:28 -0000 1.3
@@ -1,24 +1,24 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
+ *
* 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
@@ -26,9 +26,11 @@
* 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.
- * The property [children] defined by the Document Type Declaration
- * Information Item in is not accessible from DOM Level 3 Core.
- * <p>See also the <a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <code>DocumentType</code> nodes are read-only.
+ * <p ><b>Note:</b> The property [children] defined by the Document Type
+ * Declaration Information Item in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * is not accessible from DOM Level 3 Core.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface DocumentType extends Node {
/**
@@ -61,14 +63,16 @@
* <br>The DOM Level 2 does not support editing notations, therefore
* <code>notations</code> cannot be altered in any way.
* <br> This attribute represents the property [notations] defined by the
- * Document Information Item in .
+ * Document Information Item in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
*/
public NamedNodeMap getNotations();
/**
* The public identifier of the external subset.
* <br> This attribute represents the property [public identifier] defined
- * by the Document Type Declaration Information Item in .
+ * by the Document Type Declaration Information Item in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
* @since DOM Level 2
*/
public String getPublicId();
@@ -77,17 +81,19 @@
* The system identifier of the external subset. This may be an absolute
* URI or not.
* <br> This attribute represents the property [system identifier] defined
- * by the Document Type Declaration Information Item in .
+ * by the Document Type Declaration Information Item in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
* @since DOM Level 2
*/
public String getSystemId();
/**
* The internal subset as a string, or <code>null</code> if there is none.
- * This is does not contain the delimiting square brackets.The actual
- * content returned depends on how much information is available to the
- * implementation. This may vary depending on various parameters,
- * including the XML processor used to build the document.
+ * This is does not contain the delimiting square brackets.
+ * <p ><b>Note:</b> 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.6 +158 -118 xml-xerces/java/src/dom3/org/w3c/dom/Element.java
Index: Element.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/Element.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Element.java 16 Jan 2003 22:54:16 -0000 1.5
+++ Element.java 20 Mar 2003 00:38:28 -0000 1.6
@@ -1,24 +1,24 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
+ *
* 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
@@ -30,13 +30,13 @@
* <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
- * DOM Level 2, the method <code>normalize</code> is inherited from the
- * <code>Node</code> interface where it was moved. The property [in-scope
- * namespaces] defined in are not accessible from DOM Level 3 Core.
- * However, does provide a way to access the property [in-scope namespaces].
- *
- * <p>See also the <a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * directly access an attribute value can safely be used as a convenience.
+ * <p ><b>Note:</b> In DOM Level 2, the method <code>normalize</code> is
+ * inherited from the <code>Node</code> interface where it was moved.
+ * <p ><b>Note:</b> The property [in-scope namespaces] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * are not accessible from DOM Level 3 Core. However, [<a href='http://www.w3.org/TR/DOM-Level-3-XPath/'>DOM Level 3 XPath</a>] does
+ * provide a way to access the property [in-scope namespaces].
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface Element extends Node {
/**
@@ -86,11 +86,13 @@
throws DOMException;
/**
- * 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. If the attribute does not have a
- * specified or default value, calling this method has no effect.
+ * Removes an attribute by name. If a default value for the removed
+ * attribute is defined in the DTD, a new attribute immediately appears
+ * with the default value as well as the corresponding namespace URI,
+ * local name, and prefix when applicable. The implementation may handle
+ * default values from other schemas similarly but applications should
+ * use normalizeDocument() to guarantee this information is up-to-date.
+ * <br>If no attribute with this name is found, this method has no effect.
* <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.
@@ -136,10 +138,13 @@
throws DOMException;
/**
- * 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.
+ * Removes the specified attribute node. If a default value for the
+ * removed <code>Attr</code> node is defined in the DTD, a new node
+ * immediately appears with the default value as well as the
+ * corresponding namespace URI, local name, and prefix when applicable.
+ * The implementation may handle default values from other schemas
+ * similarly but applications should use normalizeDocument() to
+ * guarantee this information is up-to-date.
* @param oldAttr The <code>Attr</code> node to remove from the attribute
* list.
* @return The <code>Attr</code> node that was removed.
@@ -162,20 +167,22 @@
/**
* Retrieves an attribute value by local name and namespace URI.
- * <br>Documents which do not support the "XML" feature will permit only
- * the DOM Level 1 calls for creating/setting elements and attributes.
- * Hence, if you specify a non-null namespace URI, these DOMs will never
- * find a matching node.
- * <br>Per , applications must use the value null as the namespaceURI
- * parameter for methods if they wish to have no namespace.
+ * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+ * , applications must use the value null as the namespaceURI parameter
+ * for methods if they wish to have no namespace.
* @param namespaceURI The namespace URI of the attribute to retrieve.
* @param localName The local name of the attribute to retrieve.
* @return The <code>Attr</code> value as a string, or the empty string
* if that attribute does not have a specified or default value.
+ * @exception DOMException
+ * NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature "XML" and the language exposed through the
+ * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
public String getAttributeNS(String namespaceURI,
- String localName);
+ String localName)
+ throws DOMException;
/**
* Adds a new attribute. If an attribute with the same local name and
@@ -192,8 +199,9 @@
* and use <code>setAttributeNodeNS</code> or
* <code>setAttributeNode</code> to assign it as the value of an
* attribute.
- * <br>Per , applications must use the value null as the namespaceURI
- * parameter for methods if they wish to have no namespace.
+ * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+ * , applications must use the value null as the namespaceURI parameter
+ * for methods if they wish to have no namespace.
* @param namespaceURI The namespace URI of the attribute to create or
* alter.
* @param qualifiedName The qualified name of the attribute to create or
@@ -201,21 +209,19 @@
* @param value The value to set in string form.
* @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified qualified name
- * contains an illegal character, per the XML 1.0 specification .
+ * 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
* malformed per the Namespaces in XML specification, if the
* <code>qualifiedName</code> has a prefix and the
* <code>namespaceURI</code> is <code>null</code>, if the
* <code>qualifiedName</code> has a prefix that is "xml" and the
- * <code>namespaceURI</code> is different from "
- * http://www.w3.org/XML/1998/namespace", or if the
- * <code>qualifiedName</code>, or its prefix, is "xmlns" and the
- * <code>namespaceURI</code> is different from "
- * http://www.w3.org/2000/xmlns/".
- * <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
- * support the <code>"XML"</code> feature, since namespaces were
- * defined by XML.
+ * <code>namespaceURI</code> is different from "<a href='http://www.w3.org/XML/1998/namespace'>
+ * http://www.w3.org/XML/1998/namespace</a>", if the <code>qualifiedName</code> or its prefix is "xmlns" and the
+ * <code>namespaceURI</code> is different from "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>", or if the <code>namespaceURI</code> is "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>" and neither the <code>qualifiedName</code> nor its prefix is "xmlns".
+ * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature "XML" and the language exposed through the
+ * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
public void setAttributeNS(String namespaceURI,
@@ -224,21 +230,25 @@
throws DOMException;
/**
- * 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. If the attribute does not have a
- * specified or default value, calling this method has no effect.
- * <br>Documents which do not support the "XML" feature will permit only
- * the DOM Level 1 calls for creating/setting elements and attributes.
- * Hence, if you specify a non-null namespace URI, these DOMs will never
- * find a matching node.
- * <br>Per , applications must use the value null as the namespaceURI
- * parameter for methods if they wish to have no namespace.
+ * Removes an attribute by local name and namespace URI. If a default
+ * value for the removed attribute is defined in the DTD, a new
+ * attribute immediately appears with the default value as well as the
+ * corresponding namespace URI, local name, and prefix when applicable.
+ * The implementation may handle default values from other schemas
+ * similarly but applications should use normalizeDocument() to
+ * guarantee this information is up-to-date.
+ * <br>If no attribute with this local name and namespace URI is found,
+ * this method has no effect.
+ * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+ * , applications must use the value null as the namespaceURI parameter
+ * for methods if they wish to have no namespace.
* @param namespaceURI The namespace URI of the attribute to remove.
* @param localName The local name of the attribute to remove.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
+ * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature "XML" and the language exposed through the
+ * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
public void removeAttributeNS(String namespaceURI,
@@ -247,28 +257,31 @@
/**
* Retrieves an <code>Attr</code> node by local name and namespace URI.
- * <br>Documents which do not support the "XML" feature will permit only
- * the DOM Level 1 calls for creating/setting elements and attributes.
- * Hence, if you specify a non-null namespace URI, these DOMs will never
- * find a matching node.
- * <br>Per , applications must use the value null as the namespaceURI
- * parameter for methods if they wish to have no namespace.
+ * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+ * , applications must use the value null as the namespaceURI parameter
+ * for methods if they wish to have no namespace.
* @param namespaceURI The namespace URI of the attribute to retrieve.
* @param localName The local name of the attribute to retrieve.
* @return The <code>Attr</code> node with the specified attribute local
* name and namespace URI or <code>null</code> if there is no such
* attribute.
+ * @exception DOMException
+ * NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature "XML" and the language exposed through the
+ * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
public Attr getAttributeNodeNS(String namespaceURI,
- String localName);
+ String localName)
+ throws DOMException;
/**
* 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. Replacing an attribute node by itself has no effect.
- * <br>Per , applications must use the value null as the namespaceURI
- * parameter for methods if they wish to have no namespace.
+ * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+ * , applications must use the value null as the namespaceURI parameter
+ * for methods if they wish to have no namespace.
* @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
@@ -282,9 +295,9 @@
* attribute of another <code>Element</code> object. The DOM user must
* explicitly clone <code>Attr</code> nodes to re-use them in other
* elements.
- * <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
- * support the <code>"XML"</code> feature, since namespaces were
- * defined by XML.
+ * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature "XML" and the language exposed through the
+ * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
public Attr setAttributeNodeNS(Attr newAttr)
@@ -294,20 +307,21 @@
* Returns a <code>NodeList</code> of all the descendant
* <code>Elements</code> with a given local name and namespace URI in
* document order.
- * <br>Documents which do not support the "XML" feature will permit only
- * the DOM Level 1 calls for creating/setting elements and attributes.
- * Hence, if you specify a non-null namespace URI, these DOMs will never
- * find a matching node.
* @param namespaceURI The namespace URI of the elements to match on. The
* special value "*" matches all namespaces.
* @param localName The local name of the elements to match on. The
* special value "*" matches all local names.
* @return A new <code>NodeList</code> object containing all the matched
* <code>Elements</code>.
+ * @exception DOMException
+ * NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature "XML" and the language exposed through the
+ * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
public NodeList getElementsByTagNameNS(String namespaceURI,
- String localName);
+ String localName)
+ throws DOMException;
/**
* Returns <code>true</code> when an attribute with a given name is
@@ -325,72 +339,98 @@
* 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.
- * <br>Documents which do not support the "XML" feature will permit only
- * the DOM Level 1 calls for creating/setting elements and attributes.
- * Hence, if you specify a non-null namespace URI, these DOMs will never
- * find a matching node.
- * <br>Per , applications must use the value null as the namespaceURI
- * parameter for methods if they wish to have no namespace.
+ * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+ * , applications must use the value null as the namespaceURI parameter
+ * for methods if they wish to have no namespace.
* @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.
+ * @exception DOMException
+ * NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature "XML" and the language exposed through the
+ * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
public boolean hasAttributeNS(String namespaceURI,
- String localName);
+ String localName)
+ throws DOMException;
/**
- * Declares the attribute specified by node to be of type ID.
- * If the value of the specified attribute is unique then this
- * element node can later be retrieved using getElementById on Document.
- * Note, however, that this simply affects this node and does not change
- * any grammar that may be in use.
- *
- * @param at
- * @param makeId
+ * The type information associated with this element.
* @since DOM Level 3
*/
- public void setIdAttributeNode(Attr at, boolean makeId) throws DOMException;
+ public TypeInfo getSchemaTypeInfo();
/**
- * Declares the attribute specified by name to be of type ID.
- * If the value of the specified attribute is unique then this
- * element node can later be retrieved using getElementById on Document.
- * Note, however, that this simply affects this node and does not change
- * any grammar that may be in use.
- * To specify an attribute by local name and namespace URI, use the setIdAttributeNS method.
- *
- * @param name
- * @param makeId
+ * Declares the attribute specified by name to be of type ID. If the value
+ * of the specified attribute is unique then this element node can later
+ * be retrieved using <code>getElementById</code> on
+ * <code>Document</code>. Note, however, that this simply affects this
+ * node and does not change any grammar that may be in use.
+ * Consequently, it may be reset according to the grammar when the
+ * document is normalized.
+ * <br>To specify an attribute by local name and namespace URI, use the
+ * <code>setIdAttributeNS</code> method.
+ * @param name The name of the attribute.
+ * @param isId Whether the attribute is a of type ID.
* @exception DOMException
+ * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
+ * <br>NOT_FOUND_ERR: Raised if the specified node is not an attribute
+ * of this element.removeAttribute is a no-op if the attribute does
+ * not exist. Does it matter?removeAttribute is fine as a no-op
+ * because the application gets the right result. This isn't true
+ * here. So keep the exception. (Telcon 2002 June 12)
* @since DOM Level 3
*/
- public void setIdAttribute(String name, boolean makeId) throws DOMException;
+ public void setIdAttribute(String name,
+ boolean isId)
+ throws DOMException;
/**
- * Declares the attribute specified by local name and namespace URI
- * to be of type ID. If the value of the specified attribute is unique
- * then this element node can later be retrieved using getElementById on
- * Document. Note, however, that this simply affects this node and does
- * not change any grammar that may be in use.
- *
- * @param namespaceURI
- * @param localName
- * @param makeId
- * @exception DOMException
- * @since DOM Level 3
- */
- public void setIdAttributeNS(String namespaceURI, String localName,
- boolean makeId) throws DOMException;
-
- /**
- * The type information associated with this element.
+ * Declares the attribute specified by local name and namespace URI to be
+ * of type ID. If the value of the specified attribute is unique then
+ * this element node can later be retrieved using
+ * <code>getElementById</code> on <code>Document</code>. Note, however,
+ * that this simply affects this node and does not change any grammar
+ * that may be in use. Consequently, it may be reset according to the
+ * grammar when the document is normalized.
+ * @param namespaceURI The namespace URI of the attribute.
+ * @param localName The local name of the attribute.
+ * @param isId Whether the attribute is a of type ID.
+ * @exception DOMException
+ * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
+ * <br>NOT_FOUND_ERR: Raised if the specified node is not an attribute
+ * of this element.removeAttributeNS is a no-op if the attribute does
+ * not exist. Does it matter?removeAttributeNS is fine as a no-op
+ * because the application gets the right result. This isn't true
+ * here. So keep the exception. (Telcon 2002 June 12)
* @since DOM Level 3
*/
- public TypeInfo getSchemaTypeInfo();
-
+ public void setIdAttributeNS(String namespaceURI,
+ String localName,
+ boolean isId)
+ throws DOMException;
+ /**
+ * Declares the attribute specified by node to be of type ID. If the value
+ * of the specified attribute is unique then this element node can later
+ * be retrieved using <code>getElementById</code> on
+ * <code>Document</code>. Note, however, that this simply affects this
+ * node and does not change any grammar that may be in use.
+ * Consequently, it may be reset according to the grammar when the
+ * document is normalized.
+ * @param idAttr The attribute node.
+ * @param isId Whether the attribute is a of type ID.
+ * @exception DOMException
+ * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
+ * <br>NOT_FOUND_ERR: Raised if the specified node is not an attribute
+ * of this element.
+ * @since DOM Level 3
+ */
+ public void setIdAttributeNode(Attr idAttr,
+ boolean isId)
+ throws DOMException;
}
1.3 +32 -31 xml-xerces/java/src/dom3/org/w3c/dom/Entity.java
Index: Entity.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/Entity.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Entity.java 19 Jun 2002 22:27:10 -0000 1.2
+++ Entity.java 20 Mar 2003 00:38:28 -0000 1.3
@@ -1,28 +1,26 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
- * 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.
+ *
+ * This interface represents a known entity, either parsed or unparsed, in an
+ * XML document. Note that this models the entity itself <em>not</em> the entity declaration.
* <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
@@ -33,33 +31,35 @@
* 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 text of the entity may not be available. When
- * the replacement text is available, the corresponding <code>Entity</code>
- * node's child list represents the structure of that replacement value.
- * Otherwise, the child list is empty.
+ * the <a href='http://www.w3.org/TR/2000/REC-xml-20001006#intern-replacement'>
+ * replacement text</a> is available, the corresponding <code>Entity</code> node's child list
+ * represents the structure of that replacement value. 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>,
* 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.
* <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>
- * 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. The properties [notation name] and [notation] defined
- * in are not accessible from DOM Level 3 Core. However, does provide a
- * way to access them.
- * <p>See also the <a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <p>An <code>Entity</code> node does not have any parent.
+ * <p ><b>Note:</b> 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> 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 ><b>Note:</b> The properties [notation name] and [notation] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * are not accessible from DOM Level 3 Core.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface Entity extends Node {
/**
* The public identifier associated with the entity if specified, and
* <code>null</code> otherwise.
* <br> This attribute represents the property [public identifier] defined
- * by the Unparsed Entity Information Item in .
+ * by the Unparsed Entity Information Item in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
*/
public String getPublicId();
@@ -67,7 +67,8 @@
* The system identifier associated with the entity if specified, and
* <code>null</code> otherwise. This may be an absolute URI or not.
* <br> This attribute represents the property [system identifier] defined
- * by the Unparsed Entity Information Item in .
+ * by the Unparsed Entity Information Item in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
*/
public String getSystemId();
1.3 +39 -35 xml-xerces/java/src/dom3/org/w3c/dom/EntityReference.java
Index: EntityReference.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/EntityReference.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- EntityReference.java 19 Jun 2002 22:27:10 -0000 1.2
+++ EntityReference.java 20 Mar 2003 00:38:28 -0000 1.3
@@ -1,49 +1,53 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
- * <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 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.
+ *
+ * <code>EntityReference</code> nodes may be used to represent an entity
+ * reference in the tree. 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
+ * <code>Document</code>, instead of providing <code>EntityReference</code>
+ * nodes. If it does provide such nodes, then for an
+ * <code>EntityReference</code> node that represents a reference to a known
+ * entity an <code>Entity</code> exists, and the subtree of the
+ * <code>EntityReference</code> node is a copy of the <code>Entity</code>
+ * node subtree. However, the latter 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. When an <code>EntityReference</code> node represents a reference to
+ * an unknown entity, its content is empty.
* <p>As for <code>Entity</code> nodes, <code>EntityReference</code> nodes and
- * all their descendants are readonly. The properties [system identifier]
- * and [public identifier] defined by the Unexpanded Entity Reference
- * Information Item in are accessible through the <code>Entity</code>
- * interface. The property [all declarations processed] is not accessible
- * through the DOM API.
- * <p>See also the <a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * all their descendants are readonly.
+ * <p ><b>Note:</b> The properties [system identifier] and [public
+ * identifier] defined by the Unexpanded Entity Reference Information Item
+ * in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * are accessible through the <code>Entity</code> interface. The property
+ * [all declarations processed] is not accessible through the DOM API.
+ * <p ><b>Note:</b> <code>EntityReference</code> nodes may cause element
+ * content and attribute value normalization problems when, such as in XML
+ * 1.0 and XML Schema, the normalization is be performed after entity
+ * reference are expanded.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface EntityReference extends Node {
}
1.3 +33 -30 xml-xerces/java/src/dom3/org/w3c/dom/NamedNodeMap.java
Index: NamedNodeMap.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/NamedNodeMap.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- NamedNodeMap.java 19 Jun 2002 22:27:10 -0000 1.2
+++ NamedNodeMap.java 20 Mar 2003 00:38:28 -0000 1.3
@@ -1,24 +1,24 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
+ *
* 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>;
@@ -28,7 +28,7 @@
* 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/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface NamedNodeMap {
/**
@@ -106,29 +106,32 @@
/**
* Retrieves a node specified by local name and namespace URI.
- * <br>Documents which do not support the "XML" feature will permit only
- * the DOM Level 1 calls for creating/setting elements and attributes.
- * Hence, if you specify a non-null namespace URI, these DOMs will never
- * find a matching node.
- * <br>Per , applications must use the value null as the namespaceURI
- * parameter for methods if they wish to have no namespace.
+ * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+ * , applications must use the value null as the namespaceURI parameter
+ * for methods if they wish to have no namespace.
* @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.
+ * @exception DOMException
+ * NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature "XML" and the language exposed through the
+ * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
public Node getNamedItemNS(String namespaceURI,
- String localName);
+ String localName)
+ throws DOMException;
/**
* 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. Replacing a node by itself has no effect.
- * <br>Per , applications must use the value null as the namespaceURI
- * parameter for methods if they wish to have no namespace.
+ * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+ * , applications must use the value null as the namespaceURI parameter
+ * for methods if they wish to have no namespace.
* @param arg A node to store in this map. The node will later be
* accessible using the value of its <code>namespaceURI</code> and
* <code>localName</code> attributes.
@@ -148,9 +151,9 @@
* to insert something other than an Attr node into an Element's map
* of attributes, or a non-Entity node into the DocumentType's map of
* Entities.
- * <br>NOT_SUPPORTED_ERR: Always thrown if the current document does not
- * support the <code>"XML"</code> feature, since namespaces were
- * defined by XML.
+ * <br>NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature "XML" and the language exposed through the
+ * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
public Node setNamedItemNS(Node arg)
@@ -163,12 +166,9 @@
* 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>Documents which do not support the "XML" feature will permit only
- * the DOM Level 1 calls for creating/setting elements and attributes.
- * Hence, if you specify a non-null namespace URI, these DOMs will never
- * find a matching node.
- * <br>Per , applications must use the value null as the namespaceURI
- * parameter for methods if they wish to have no namespace.
+ * <br>Per [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+ * , applications must use the value null as the namespaceURI parameter
+ * for methods if they wish to have no namespace.
* @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
@@ -177,6 +177,9 @@
* 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>NOT_SUPPORTED_ERR: May be raised if the implementation does not
+ * support the feature "XML" and the language exposed through the
+ * Document does not support XML Namespaces (such as [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @since DOM Level 2
*/
public Node removeNamedItemNS(String namespaceURI,
1.4 +194 -172 xml-xerces/java/src/dom3/org/w3c/dom/Node.java
Index: Node.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/Node.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Node.java 24 Jan 2003 15:46:19 -0000 1.3
+++ Node.java 20 Mar 2003 00:38:28 -0000 1.4
@@ -1,24 +1,24 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
+ *
* 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
@@ -126,7 +126,7 @@
* <td valign='top' rowspan='1' colspan='1'>null</td>
* </tr>
* </table>
- * <p>See also the <a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface Node {
// NodeType
@@ -186,9 +186,8 @@
/**
* 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.
+ * When it is defined to be <code>null</code>, setting it has no effect,
+ * including if the node is read-only.
* @exception DOMException
* DOMSTRING_SIZE_ERR: Raised when it would return more characters than
* fit in a <code>DOMString</code> variable on the implementation
@@ -198,13 +197,11 @@
throws DOMException;
/**
* The value of this node, depending on its type; see the table above.
- * When it is defined to be <code>null</code>, setting it has no effect.
+ * When it is defined to be <code>null</code>, setting it has no effect,
+ * including if the node is read-only.
* @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
- * @exception DOMException
- * DOMSTRING_SIZE_ERR: Raised when it would return more characters than
- * fit in a <code>DOMString</code> variable on the implementation
- * platform.
+ * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly and if
+ * it is not defined to be <code>null</code>.
*/
public void setNodeValue(String nodeValue)
throws DOMException;
@@ -225,7 +222,8 @@
* <code>ProcessingInstruction</code>, an <code>EntityReference</code>,
* a <code>CharacterData</code>, a <code>Comment</code>, or a
* <code>DocumentType</code>, this attribute represents the properties
- * [parent] defined in .
+ * [parent] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
*/
public Node getParentNode();
@@ -236,7 +234,7 @@
* <br> When the node is a <code>Document</code>, or an
* <code>Element</code>, and if the <code>NodeList</code> does not
* contain <code>EntityReference</code> or <code>CDATASection</code>
- * nodes, this attribute represents the properties [children] defined in
+ * nodes, this attribute represents the properties [children] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
* .
*/
public NodeList getChildNodes();
@@ -269,10 +267,11 @@
* A <code>NamedNodeMap</code> containing the attributes of this node (if
* it is an <code>Element</code>) or <code>null</code> otherwise.
* <br> If no namespace declaration appear in the attributes, this
- * attribute represents the property [attributes] defined in . If
- * namespace declarations appear in the attributes, this attribute
+ * attribute represents the property [attributes] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * . If namespace declarations appear in the attributes, this attribute
* combines the properties [attributes] and [namespace attributes]
- * defined in .
+ * defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
*/
public NamedNodeMap getAttributes();
@@ -343,7 +342,7 @@
* the new node is readonly.
* <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of
* this node.
- * <br>NOT_SUPPORTED_ERR: if this node if of type <code>Document</code>,
+ * <br>NOT_SUPPORTED_ERR: if this node is of type <code>Document</code>,
* this exception might be raised if the DOM implementation doesn't
* support the replacement of the <code>DocumentType</code> child or
* <code>Element</code> child.
@@ -362,7 +361,7 @@
* 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.
- * <br>NOT_SUPPORTED_ERR: if this node if of type <code>Document</code>,
+ * <br>NOT_SUPPORTED_ERR: if this node is of type <code>Document</code>,
* this exception might be raised if the DOM implementation doesn't
* support the removal of the <code>DocumentType</code> child or the
* <code>Element</code> child.
@@ -394,7 +393,7 @@
/**
* Returns whether this node has any children.
- * @return <code>true</code> if this node has any children,
+ * @return Returns <code>true</code> if this node has any children,
* <code>false</code> otherwise.
*/
public boolean hasChildNodes();
@@ -444,8 +443,10 @@
* <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
+ * XPointer [<a href='http://www.w3.org/TR/2002/PR-xptr-framework-20021113/'>XPointer</a>]
+ * lookups) that depend on a particular document tree structure are to
+ * be used.
+ * <p ><b>Note:</b> 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.
@@ -460,9 +461,9 @@
* 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
- * 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>.
+ * Level 2, version 1, this is the string "2.0". If the version is
+ * <code>null</code> or empty string, 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
@@ -474,17 +475,19 @@
* The namespace URI of this node, or <code>null</code> if it is
* unspecified.
* <br> When the node is <code>Element</code>, or <code>Attr</code>, this
- * attribute represents the properties [namespace name] defined in .
+ * attribute represents the properties [namespace name] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
* <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>.
+ * <p ><b>Note:</b> Per the <em>Namespaces in XML</em> Specification [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+ * 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();
@@ -493,12 +496,15 @@
* The namespace prefix of this node, or <code>null</code> if it is
* unspecified.
* <br> When the node is <code>Element</code>, or <code>Attr</code>, this
- * attribute represents the properties [prefix] defined in .
+ * attribute represents the properties [prefix] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
* <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>Setting the prefix to <code>null</code> makes it unspecified,
+ * setting it to an empty string is implementation dependent.
* <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
@@ -507,19 +513,6 @@
* <code>ATTRIBUTE_NODE</code> and nodes created with a DOM Level 1
* method, such as <code>createElement</code> from the
* <code>Document</code> interface, this is always <code>null</code>.
- * @exception DOMException
- * INVALID_CHARACTER_ERR: Raised if the specified prefix contains an
- * illegal character, per the XML 1.0 specification .
- * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
- * <br>NAMESPACE_ERR: Raised if the specified <code>prefix</code> is
- * malformed per the Namespaces in XML specification, if the
- * <code>namespaceURI</code> of this node is <code>null</code>, if the
- * specified prefix is "xml" and the <code>namespaceURI</code> of this
- * node is different from "http://www.w3.org/XML/1998/namespace", if
- * this node is an attribute and the specified prefix is "xmlns" and
- * the <code>namespaceURI</code> of this node is different from "
- * http://www.w3.org/2000/xmlns/", or if this node is an attribute and
- * the <code>qualifiedName</code> of this node is "xmlns" .
* @since DOM Level 2
*/
public String getPrefix();
@@ -527,12 +520,15 @@
* The namespace prefix of this node, or <code>null</code> if it is
* unspecified.
* <br> When the node is <code>Element</code>, or <code>Attr</code>, this
- * attribute represents the properties [prefix] defined in .
+ * attribute represents the properties [prefix] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
* <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>Setting the prefix to <code>null</code> makes it unspecified,
+ * setting it to an empty string is implementation dependent.
* <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
@@ -543,17 +539,17 @@
* <code>Document</code> interface, this is always <code>null</code>.
* @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified prefix contains an
- * illegal character, per the XML 1.0 specification .
+ * illegal character.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
* <br>NAMESPACE_ERR: Raised if the specified <code>prefix</code> is
* malformed per the Namespaces in XML specification, if the
* <code>namespaceURI</code> of this node is <code>null</code>, if the
* specified prefix is "xml" and the <code>namespaceURI</code> of this
- * node is different from "http://www.w3.org/XML/1998/namespace", if
- * this node is an attribute and the specified prefix is "xmlns" and
- * the <code>namespaceURI</code> of this node is different from "
- * http://www.w3.org/2000/xmlns/", or if this node is an attribute and
- * the <code>qualifiedName</code> of this node is "xmlns" .
+ * node is different from "<a href='http://www.w3.org/XML/1998/namespace'>
+ * http://www.w3.org/XML/1998/namespace</a>", if this node is an attribute and the specified prefix is "xmlns" and
+ * the <code>namespaceURI</code> of this node is different from "<a href='http://www.w3.org/2000/xmlns/'>http://www.w3.org/2000/xmlns/</a>", or if this node is an attribute and the <code>qualifiedName</code> of
+ * this node is "xmlns" [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
+ * .
* @since DOM Level 2
*/
public void setPrefix(String prefix)
@@ -562,7 +558,8 @@
/**
* Returns the local part of the qualified name of this node.
* <br> When the node is <code>Element</code>, or <code>Attr</code>, this
- * attribute represents the properties [local name] defined in .
+ * attribute represents the properties [local name] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
* <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
@@ -573,7 +570,7 @@
/**
* Returns whether this node (if it is an element) has any attributes.
- * @return <code>true</code> if this node has any attributes,
+ * @return Returns <code>true</code> if this node has any attributes,
* <code>false</code> otherwise.
* @since DOM Level 2
*/
@@ -581,31 +578,34 @@
/**
* The absolute base URI of this node or <code>null</code> if undefined.
- * This value is computed according to . However, when the
- * <code>Document</code> supports the feature "HTML" , the base URI is
- * computed using first the value of the href attribute of the HTML BASE
- * element if any, and the value of the <code>documentURI</code>
- * attribute from the <code>Document</code> interface otherwise.
+ * This value is computed according to [<a href='http://www.w3.org/TR/2001/REC-xmlbase-20010627/'>XML Base</a>].
+ * However, when the <code>Document</code> supports the feature "HTML" [<a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>DOM Level 2 HTML</a>]
+ * , the base URI is computed using first the value of the href
+ * attribute of the HTML BASE element if any, and the value of the
+ * <code>documentURI</code> attribute from the <code>Document</code>
+ * interface otherwise.
* <br> When the node is an <code>Element</code>, a <code>Document</code>
* or a a <code>ProcessingInstruction</code>, this attribute represents
- * the properties [base URI] defined in . When the node is a
- * <code>Notation</code>, an <code>Entity</code>, or an
- * <code>EntityReference</code>, this attribute represents the
- * properties [declaration base URI] in the . How will this be affected
- * by resolution of relative namespace URIs issue?It's not.Should this
- * only be on Document, Element, ProcessingInstruction, Entity, and
- * Notation nodes, according to the infoset? If not, what is it equal to
- * on other nodes? Null? An empty string? I think it should be the
- * parent's.No.Should this be read-only and computed or and actual
- * read-write attribute?Read-only and computed (F2F 19 Jun 2000 and
- * teleconference 30 May 2001).If the base HTML element is not yet
+ * the properties [base URI] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * . When the node is a <code>Notation</code>, an <code>Entity</code>,
+ * or an <code>EntityReference</code> representing an unexpanded entity
+ * reference or an internal entity reference, this attribute represents
+ * the properties [declaration base URI] in the [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * . When the node is an EntityReference representing an external
+ * entity reference this is the absolute URI of the entity. How will
+ * this be affected by resolution of relative namespace URIs issue?It's
+ * not.Should this only be on Document, Element, ProcessingInstruction,
+ * Entity, and Notation nodes, according to the infoset? If not, what is
+ * it equal to on other nodes? Null? An empty string? I think it should
+ * be the parent's.No.Should this be read-only and computed or and
+ * actual read-write attribute?Read-only and computed (F2F 19 Jun 2000
+ * and teleconference 30 May 2001).If the base HTML element is not yet
* attached to a document, does the insert change the Document.baseURI?
* Yes. (F2F 26 Sep 2001)
* @since DOM Level 3
*/
public String getBaseURI();
-
// DocumentPosition
/**
* The two nodes are disconnected. Order between disconnected nodes is
@@ -654,7 +654,6 @@
public short compareDocumentPosition(Node other)
throws DOMException;
-
/**
* This attribute returns the text content of this node and its
* descendants. When it is defined to be null, setting it has no effect.
@@ -678,32 +677,29 @@
* DOCUMENT_FRAGMENT_NODE</td>
* <td valign='top' rowspan='1' colspan='1'>concatenation of the <code>textContent</code>
* attribute value of every child node, excluding COMMENT_NODE and
- * PROCESSING_INSTRUCTION_NODE nodes</td>
+ * PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the
+ * node has no children.</td>
* </tr>
* <tr>
- * <td valign='top' rowspan='1' colspan='1'>ATTRIBUTE_NODE, TEXT_NODE,
- * CDATA_SECTION_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE</td>
- * <td valign='top' rowspan='1' colspan='1'>
- * <code>nodeValue</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>ATTRIBUTE_NODE, TEXT_NODE, CDATA_SECTION_NODE,
+ * COMMENT_NODE, PROCESSING_INSTRUCTION_NODE</td>
+ * <td valign='top' rowspan='1' colspan='1'><code>nodeValue</code></td>
* </tr>
* <tr>
- * <td valign='top' rowspan='1' colspan='1'>DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE</td>
* <td valign='top' rowspan='1' colspan='1'>
- * null</td>
+ * DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE</td>
+ * <td valign='top' rowspan='1' colspan='1'><em>null</em></td>
* </tr>
- * </table> Should any whitespace normalization be performed? MS' text
- * property doesn't but what about "ignorable whitespace"?Does not
- * perform any whitespace normalization and ignores "ignorable
- * whitespace".Should this be two methods instead?No. Keep it a read
- * write attribute.What about the name? MS uses text and innerText. text
- * conflicts with HTML DOM.Keep the current name, MS has a different
- * name and different semantic.Should this be optional?No.Setting the
- * text property on a Document, Document Type, or Notation node is an
- * error for MS. How do we expose it? Exception? Which one?
- * (teleconference 23 May 2001) consistency with nodeValue. Remove
- * Document from the list.
- * @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
+ * </table> Should any whitespace normalization be performed? MS' text property
+ * doesn't but what about "ignorable whitespace"?Does not perform any
+ * whitespace normalization and ignores "ignorable whitespace".Should
+ * this be two methods instead?No. Keep it a read write attribute.What
+ * about the name? MS uses text and innerText. text conflicts with HTML
+ * DOM.Keep the current name, MS has a different name and different
+ * semantic.Should this be optional?No.Setting the text property on a
+ * Document, Document Type, or Notation node is an error for MS. How do
+ * we expose it? Exception? Which one?(teleconference 23 May 2001)
+ * consistency with nodeValue. Remove Document from the list.
* @exception DOMException
* DOMSTRING_SIZE_ERR: Raised when it would return more characters than
* fit in a <code>DOMString</code> variable on the implementation
@@ -711,7 +707,7 @@
* @since DOM Level 3
*/
public String getTextContent()
- throws DOMException;
+ throws DOMException;
/**
* This attribute returns the text content of this node and its
* descendants. When it is defined to be null, setting it has no effect.
@@ -735,40 +731,35 @@
* DOCUMENT_FRAGMENT_NODE</td>
* <td valign='top' rowspan='1' colspan='1'>concatenation of the <code>textContent</code>
* attribute value of every child node, excluding COMMENT_NODE and
- * PROCESSING_INSTRUCTION_NODE nodes</td>
+ * PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the
+ * node has no children.</td>
* </tr>
* <tr>
- * <td valign='top' rowspan='1' colspan='1'>ATTRIBUTE_NODE, TEXT_NODE,
- * CDATA_SECTION_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE</td>
- * <td valign='top' rowspan='1' colspan='1'>
- * <code>nodeValue</code></td>
+ * <td valign='top' rowspan='1' colspan='1'>ATTRIBUTE_NODE, TEXT_NODE, CDATA_SECTION_NODE,
+ * COMMENT_NODE, PROCESSING_INSTRUCTION_NODE</td>
+ * <td valign='top' rowspan='1' colspan='1'><code>nodeValue</code></td>
* </tr>
* <tr>
- * <td valign='top' rowspan='1' colspan='1'>DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE</td>
* <td valign='top' rowspan='1' colspan='1'>
- * null</td>
+ * DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE</td>
+ * <td valign='top' rowspan='1' colspan='1'><em>null</em></td>
* </tr>
- * </table> Should any whitespace normalization be performed? MS' text
- * property doesn't but what about "ignorable whitespace"?Does not
- * perform any whitespace normalization and ignores "ignorable
- * whitespace".Should this be two methods instead?No. Keep it a read
- * write attribute.What about the name? MS uses text and innerText. text
- * conflicts with HTML DOM.Keep the current name, MS has a different
- * name and different semantic.Should this be optional?No.Setting the
- * text property on a Document, Document Type, or Notation node is an
- * error for MS. How do we expose it? Exception? Which one?
- * (teleconference 23 May 2001) consistency with nodeValue. Remove
- * Document from the list.
+ * </table> Should any whitespace normalization be performed? MS' text property
+ * doesn't but what about "ignorable whitespace"?Does not perform any
+ * whitespace normalization and ignores "ignorable whitespace".Should
+ * this be two methods instead?No. Keep it a read write attribute.What
+ * about the name? MS uses text and innerText. text conflicts with HTML
+ * DOM.Keep the current name, MS has a different name and different
+ * semantic.Should this be optional?No.Setting the text property on a
+ * Document, Document Type, or Notation node is an error for MS. How do
+ * we expose it? Exception? Which one?(teleconference 23 May 2001)
+ * consistency with nodeValue. Remove Document from the list.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
- * @exception DOMException
- * DOMSTRING_SIZE_ERR: Raised when it would return more characters than
- * fit in a <code>DOMString</code> variable on the implementation
- * platform.
* @since DOM Level 3
*/
public void setTextContent(String textContent)
- throws DOMException;
+ throws DOMException;
/**
* Returns whether this node is the same node as the given one.
@@ -792,31 +783,28 @@
/**
* Look up the prefix associated to the given namespace URI, starting from
- * this node.
+ * this node. The default namespace declarations are ignored by this
+ * method.
* <br>See for details on the algorithm used by this method.Should this
* be optional?No.How does the lookup work? Is it based on the prefix of
* the nodes, the namespace declaration attributes, or a combination of
* both?See .
* @param namespaceURI The namespace URI to look for.
- * @param useDefault Indicates if the lookup mechanism should take into
- * account the default namespace or not.
- * @return Returns an associated namespace prefix if found,
- * <code>null</code> if none is found and <code>useDefault</code> is
- * false, or <code>null</code> if not found or it is the default
- * namespace and <code>useDefault</code> is <code>true</code>. If more
- * than one prefix are associated to the namespace prefix, the
- * returned namespace prefix is implementation dependent.
+ * @return Returns an associated namespace prefix if found or
+ * <code>null</code> if none is found. If more than one prefix are
+ * associated to the namespace prefix, the returned namespace prefix
+ * is implementation dependent.
* @since DOM Level 3
*/
- public String lookupNamespacePrefix(String namespaceURI,
- boolean useDefault);
+ public String lookupPrefix(String namespaceURI);
/**
* This method checks if the specified <code>namespaceURI</code> is the
* default namespace or not.
* @param namespaceURI The namespace URI to look for.
- * @return <code>true</code> if the specified <code>namespaceURI</code>
- * is the default namespace, <code>false</code> otherwise.
+ * @return Returns <code>true</code> if the specified
+ * <code>namespaceURI</code> is the default namespace,
+ * <code>false</code> otherwise.
* @since DOM Level 3
*/
public boolean isDefaultNamespace(String namespaceURI);
@@ -845,60 +833,94 @@
* tested with <code>Node.isSameNode</code>. All nodes that are the same
* will also be equal, though the reverse may not be true.
* <br>Two nodes are equal if and only if the following conditions are
- * satisfied: The two nodes are of the same type.The following string
+ * satisfied:
+ * <ul>
+ * <li>The two nodes are of the same type.
+ * </li>
+ * <li>The following string
* attributes are equal: <code>nodeName</code>, <code>localName</code>,
* <code>namespaceURI</code>, <code>prefix</code>, <code>nodeValue</code>
- * , <code>baseURI</code>. This is: they are both <code>null</code>, or
- * they have the same length and are character for character identical.
- * The <code>attributes</code> <code>NamedNodeMaps</code> are equal.
+ * . This is: they are both <code>null</code>, or they have the same
+ * length and are character for character identical.
+ * </li>
+ * <li>The
+ * <code>attributes</code> <code>NamedNodeMaps</code> are equal. This
+ * is: they are both <code>null</code>, or they have the same length and
+ * for each node that exists in one map there is a node that exists in
+ * the other map and is equal, although not necessarily at the same
+ * index.
+ * </li>
+ * <li>The <code>childNodes</code> <code>NodeLists</code> are equal.
* This is: they are both <code>null</code>, or they have the same
- * length and for each node that exists in one map there is a node that
- * exists in the other map and is equal, although not necessarily at the
- * same index.The <code>childNodes</code> <code>NodeLists</code> are
- * equal. This is: they are both <code>null</code>, or they have the
- * same length and contain equal nodes at the same index. Note that
+ * length and contain equal nodes at the same index. Note that
* normalization can affect equality; to avoid this, nodes should be
- * normalized before being compared.
+ * normalized before being compared.
+ * </li>
+ * </ul>
* <br>For two <code>DocumentType</code> nodes to be equal, the following
- * conditions must also be satisfied: The following string attributes
+ * conditions must also be satisfied:
+ * <ul>
+ * <li>The following string attributes
* are equal: <code>publicId</code>, <code>systemId</code>,
- * <code>internalSubset</code>.The <code>entities</code>
- * <code>NamedNodeMaps</code> are equal.The <code>notations</code>
- * <code>NamedNodeMaps</code> are equal.
+ * <code>internalSubset</code>.
+ * </li>
+ * <li>The <code>entities</code>
+ * <code>NamedNodeMaps</code> are equal.
+ * </li>
+ * <li>The <code>notations</code>
+ * <code>NamedNodeMaps</code> are equal.
+ * </li>
+ * </ul>
* <br>On the other hand, the following do not affect equality: the
- * <code>ownerDocument</code> attribute, the <code>specified</code>
- * attribute for <code>Attr</code> nodes, the
+ * <code>ownerDocument</code>, <code>baseURI</code>, and
+ * <code>parentNode</code> attributes, the <code>specified</code> and
+ * attribute for <code>Attr</code> nodes, the <code>schemaTypeInfo</code>
+ * attribute for <code>Attr</code> and <code>Element</code> nodes, the
* <code>isWhitespaceInElementContent</code> attribute for
* <code>Text</code> nodes, as well as any user data or event listeners
- * registered on the nodes.Should this be optional?No.Should the deep
- * parameter be dropped?Yes (Telcon Apr 3, 2002).
+ * registered on the nodes.
+ * <p ><b>Note:</b> As a general rule, anything not mentioned in the
+ * description above is not significant in consideration of equality
+ * checking. Note that future versions of this specification may take
+ * into account more attributes and implementations conform to this
+ * specification are expected to be updated accordingly. Should this be
+ * optional?No.Should the deep parameter be dropped?Yes (Telcon Apr 3,
+ * 2002).
* @param arg The node to compare equality with.
- * @return If the nodes, and possibly subtrees are equal,
- * <code>true</code> otherwise <code>false</code>.
+ * @return Returns <code>true</code> if the nodes are equal,
+ * <code>false</code> otherwise.
* @since DOM Level 3
*/
public boolean isEqualNode(Node arg);
/**
- * This method makes available a <code>Node</code>'s specialized interface
- * (see ).What are the relations between Node.isSupported and
- * Node3.getInterface?Should we rename this method (and also
- * DOMImplementation.getInterface?)?getInterface can return a node that
- * doesn't actually support the requested interface and will lead to a
- * cast exception. Other solutions are returning null or throwing an
- * exception.
+ * This method returns a specialized object which implements the
+ * specialized APIs of the specified feature and version. The
+ * specialized object may also be obtained by using binding-specific
+ * casting methods but is not necessarily expected to, as discussed in .
+ * This method also allow the implementation to provide specialized
+ * objects which do not support the <code>Node</code> interface. What
+ * are the relations between Node.isSupported and Node3.getFeature?
+ * getFeature can return a node that doesn't actually support the
+ * requested interface and will lead to a cast exception. Other
+ * solutions are returning null or throwing an exception.
* @param feature The name of the feature requested (case-insensitive).
- * @return Returns an alternate <code>Node</code> which implements the
- * specialized APIs of the specified feature, if any, or
- * <code>null</code> if there is no alternate <code>Node</code> which
- * implements interfaces associated with that feature. Any alternate
- * <code>Node</code> returned by this method must delegate to the
+ * @param version This is the version number of the feature to test. If
+ * the version is <code>null</code> or the empty string, supporting
+ * any version of the feature will cause the method to return an
+ * object that supports at least one version of the feature.
+ * @return Returns an object which implements the specialized APIs of
+ * the specified feature and version, if any, or <code>null</code> if
+ * there is no object which implements interfaces associated with that
+ * feature. If the <code>DOMObject</code> returned by this method
+ * implements the <code>Node</code> interface, it must delegate to the
* primary core <code>Node</code> and not return results inconsistent
- * with the primary core <code>Node</code> such as <code>key</code>,
- * <code>attributes</code>, <code>childNodes</code>, etc.
+ * with the primary core <code>Node</code> such as attributes,
+ * childNodes, etc.
* @since DOM Level 3
*/
- public Node getInterface(String feature);
+ public Node getFeature(String feature,
+ String version);
/**
* Associate an object to a key on this node. The object can later be
1.3 +12 -12 xml-xerces/java/src/dom3/org/w3c/dom/NodeList.java
Index: NodeList.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/NodeList.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- NodeList.java 19 Jun 2002 22:27:10 -0000 1.2
+++ NodeList.java 20 Mar 2003 00:38:28 -0000 1.3
@@ -1,30 +1,30 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
+ *
* The <code>NodeList</code> interface provides the abstraction of an ordered
* collection of nodes, without defining or constraining how this collection
* 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/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface NodeList {
/**
1.3 +22 -21 xml-xerces/java/src/dom3/org/w3c/dom/Notation.java
Index: Notation.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/Notation.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Notation.java 19 Jun 2002 22:27:10 -0000 1.2
+++ Notation.java 20 Mar 2003 00:38:28 -0000 1.3
@@ -1,44 +1,44 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
+ *
* 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
- * <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;
- * they are therefore readonly.
+ * declares, by name, the format of an unparsed entity (see <a href='http://www.w3.org/TR/2000/REC-xml-20001006#Notations'>section 4.7</a> of the XML 1.0 specification [<a href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>]), or is
+ * used for formal declaration of processing instruction targets (see <a href='http://www.w3.org/TR/2000/REC-xml-20001006#sec-pi'>section 2.6</a> of the XML 1.0 specification [<a href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>]). The
+ * <code>nodeName</code> attribute inherited from <code>Node</code> is set
+ * to the declared name of the notation.
+ * <p>The DOM Core does not support editing <code>Notation</code> nodes; they
+ * are therefore readonly.
* <p>A <code>Notation</code> node does not have any parent.adds a
* namespaceURI for notations?No. 1- notations are attached to a
* <code>DocumentType</code>. 2- what would be the key for notations in
* namednodemap?
- * <p>See also the <a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 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>.
* <br> This attribute represents the property [public identifier] defined
- * by the Notation Information Item in .
+ * by the Notation Information Item in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
*/
public String getPublicId();
@@ -47,7 +47,8 @@
* not specified, this is <code>null</code>. This may be an absolute URI
* or not.
* <br> This attribute represents the property [system identifier] defined
- * by the Notation Information Item in .
+ * by the Notation Information Item in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
*/
public String getSystemId();
1.3 +22 -20 xml-xerces/java/src/dom3/org/w3c/dom/ProcessingInstruction.java
Index: ProcessingInstruction.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/ProcessingInstruction.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ProcessingInstruction.java 19 Jun 2002 22:27:10 -0000 1.2
+++ ProcessingInstruction.java 20 Mar 2003 00:38:28 -0000 1.3
@@ -1,36 +1,38 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
+ *
* 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. The property [notation] defined in is not
- * accessible from DOM Level 3 Core.
- * <p>See also the <a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * in the text of the document.
+ * <p ><b>Note:</b> The property [notation] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * is not accessible from DOM Level 3 Core.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface ProcessingInstruction extends Node {
/**
* The target of this processing instruction. XML defines this as being
* the first token following the markup that begins the processing
* instruction.
- * <br> This attribute represents the property [target] defined in .
+ * <br> This attribute represents the property [target] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
*/
public String getTarget();
@@ -39,9 +41,8 @@
* white space character after the target to the character immediately
* preceding the <code>?></code>.
* <br> This attribute represents the property [content] defined by the
- * Processing Instruction Information Item in .
- * @exception DOMException
- * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
+ * Processing Instruction Information Item in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
*/
public String getData();
/**
@@ -49,11 +50,12 @@
* white space character after the target to the character immediately
* preceding the <code>?></code>.
* <br> This attribute represents the property [content] defined by the
- * Processing Instruction Information Item in .
+ * Processing Instruction Information Item in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
*/
public void setData(String data)
- throws DOMException;
+ throws DOMException;
}
1.3 +26 -26 xml-xerces/java/src/dom3/org/w3c/dom/Text.java
Index: Text.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/Text.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Text.java 19 Jun 2002 22:27:10 -0000 1.2
+++ Text.java 20 Mar 2003 00:38:28 -0000 1.3
@@ -1,32 +1,31 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
+ *
* 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.
+ * and represents the textual content (termed <a href='http://www.w3.org/TR/2000/REC-xml-20001006#syntax'>character data</a> 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
@@ -36,7 +35,7 @@
* <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/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface Text extends CharacterData {
/**
@@ -61,14 +60,15 @@
/**
* Returns whether this text node contains whitespace in element content,
- * often abusively called "ignorable whitespace".An implementation can
- * only return <code>true</code> if, one way or another, it has access
- * to the relevant information (e.g., the DTD or schema).
+ * often abusively called "ignorable whitespace".
* <br> This attribute represents the property [element content
- * whitespace] defined in .
+ * whitespace] defined in [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * .
+ * @return Returns <code>true</code> if this text node contains
+ * whitespace in element content, <code>false</code> otherwise.
* @since DOM Level 3
*/
- public boolean getIsWhitespaceInElementContent();
+ public boolean isWhitespaceInElementContent();
/**
* Returns all text of <code>Text</code> nodes logically-adjacent text
@@ -78,8 +78,8 @@
public String getWholeText();
/**
- * Substitutes the a specified text for the text of the current node and
- * all logically-adjacent text nodes.
+ * Substitutes the specified text for the text of the current node and all
+ * logically-adjacent text nodes.
* <br>This method returns the node in the hierarchy which received the
* replacement text, which is null if the text was empty or is the
* current node if the current node is not read-only or otherwise is a
1.2 +74 -51 xml-xerces/java/src/dom3/org/w3c/dom/TypeInfo.java
Index: TypeInfo.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/TypeInfo.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TypeInfo.java 16 Jan 2003 22:54:16 -0000 1.1
+++ TypeInfo.java 20 Mar 2003 00:38:28 -0000 1.2
@@ -1,64 +1,87 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
+
package org.w3c.dom;
-/**
+/**
+ * DOM Level 3 WD Experimental:
+ * The DOM Level 3 specification is at the stage
+ * of Working Draft, which represents work in
+ * progress and thus may be updated, replaced,
+ * or obsoleted by other documents at any time.
+ *
* The <code>TypeInfo</code> interface represent a type referenced from
* <code>Element</code> or <code>Attr</code> nodes, specified in the schemas
* associated with the document. The type is a pair of a namespace URI and
* name properties, and depends on the document's schema. should you be
- * able to return <code>null</code> on <code>name</code>? for anonymous
+ * able to return <code>null</code> on <code>typeName</code>? for anonymous
* type? for undeclared elements/attributes? Can schemaType be
- * <code>null</code>?
- * <p> If the document's schema is an XML DTD [<a href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>], the values are computed as
- * follows: If this type is referenced from an <code>Attr</code> node,
- * <code>namespace</code> is <code>null</code> and <code>name</code>
- * represents the [attribute type] property in the [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]. If there is no
- * declaration for the attribute, <code>name</code> is <code>null</code>.
- * Unlike for XML Schema, the name contain the declared type, and does not
- * relate to "validity". If this type is referenced from an
- * <code>Element</code> node, the <code>namespace</code> and
- * <code>name</code> are <code>null</code>.
- * <p>
- * If the document's schema is an XML Schema [XML Schema Part 1], the
- * values are computed as follows (for definitions see Post-Schema
- * Validation infoset):
- * <p>If the [validity] property exists AND is "invalid" or "notKnown":
- * the {target namespace} and {name} properties of the declared type
- * if available, otherwise null.
- * <p>Note: At the time of writing, the XML Schema specification does not
- * require exposing the declared type. Thus, DOM implementations
- * might choose not to provide type information if validity is not valid.
- * <p>If the [validity] property exists and is "valid" the name and namespace
- * computed as follows:
- * <p>a) If [member type definition] exists, then expose the
- * {target namespace} and {name} properties of the
- * [member type definition] property;
- * <p>b) If the [member type definition namespace] and the
- * [member type definition name] exist, then expose these properties.
- * <p>c) If the [type definition] property exists, then expose the {target
- * namespace} and {name} properties of the [type definition] property;
- * <p>d) If the [type definition namespace] and the [type definition name]
- * exist, then expose these properties.
- *
- * <p> Note: At the time of writing, the XML Schema specification does not
- * define how to expose annonimous types. If future specifications
- * define how to expose annonimous types, DOM implementations can expose
- * annonimous types via "name" and "namespace" parameters.
- *
- * Other schema languages are outside the scope of the
- * W3C and therefore should define how to represent their type systems using
+ * <code>null</code>? schemaTypeInfo can never be null [f2f October 2002].
+ * <p> If the document's schema is an XML DTD [<a href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>], the values
+ * are computed as follows:
+ * <ul>
+ * <li> If this type is referenced from an
+ * <code>Attr</code> node, <code>typeNamespace</code> is <code>null</code>
+ * and <code>typeName</code> represents the [attribute type] property in the [<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information set</a>]
+ * . If there is no declaration for the attribute, <code>typeName</code> is
+ * <code>null</code>. Unlike for XML Schema, the name contain the declared
+ * type, and does not relate to "validity". Resolved using Elena's proposal.
+ * </li>
+ * <li>
+ * If this type is referenced from an <code>Element</code> node, the
+ * <code>typeNamespace</code> and <code>typeName</code> are <code>null</code>
+ * .
+ * </li>
+ * </ul>
+ * <p> If the document's schema is an XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
+ * , the values are computed as follows using the post-schema-validation
+ * infoset contributions (also called PSVI contributions):
+ * <ul>
+ * <li> If the
+ * [validity] property exists AND is <em>"invalid"</em> or <em>"notKnown"</em>: the {target namespace} and {name} properties of the declared type if
+ * available, otherwise <code>null</code>.
+ * <p ><b>Note:</b> At the time of writing, the XML Schema specification does
+ * not require exposing the declared type. Thus, DOM implementations might
+ * choose not to provide type information if validity is not valid.
+ * </li>
+ * <li> If the
+ * [validity] property exists and is <em>"valid"</em>:
+ * <ol>
+ * <li> If [member type definition] exists, then expose the {target namespace}
+ * and {name} properties of the [member type definition] property;
+ * </li>
+ * <li> If the
+ * [member type definition namespace] and the [member type definition name]
+ * exist, then expose these properties.
+ * </li>
+ * <li> If the [type definition] property
+ * exists, then expose the {target namespace} and {name} properties of the
+ * [type definition] property;
+ * </li>
+ * <li> If the [type definition namespace] and the
+ * [type definition name] exist, then expose these properties.
+ * </li>
+ * </ol>
+ * </li>
+ * </ul>
+ * <p ><b>Note:</b> At the time of writing, the XML Schema specification does
+ * not define how to expose anonymous types. If future specifications define
+ * how to expose anonymous types, DOM implementations can expose anonymous
+ * types via <code>typeName</code> and <code>typeNamespace</code>
+ * parameters.
+ * <p ><b>Note:</b> Other schema languages are outside the scope of the W3C
+ * and therefore should define how to represent their type systems using
* <code>TypeInfo</code>.
- * <p>See also the <a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20021022'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface TypeInfo {
1.3 +19 -15 xml-xerces/java/src/dom3/org/w3c/dom/UserDataHandler.java
Index: UserDataHandler.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/dom3/org/w3c/dom/UserDataHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- UserDataHandler.java 19 Jun 2002 22:27:10 -0000 1.2
+++ UserDataHandler.java 20 Mar 2003 00:38:28 -0000 1.3
@@ -1,30 +1,31 @@
/*
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * 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.
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
-/**
+/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
- * <p>
+ *
* When associating an object to a key on a node using <code>setUserData</code>
* the application can provide a handler that gets called when the node the
- * object is associated to is being cloned or imported. This can be used by
- * the application to implement various behaviors regarding the data it
- * associates to the DOM nodes. This interface defines that handler.
- * <p>See also the <a href='http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020409'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * object is associated to is being cloned, imported, or renamed. This can
+ * be used by the application to implement various behaviors regarding the
+ * data it associates to the DOM nodes. This interface defines that handler.
+ * <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
+ * @since DOM Level 3
*/
public interface UserDataHandler {
// OperationType
@@ -38,6 +39,9 @@
public static final short NODE_IMPORTED = 2;
/**
* The node is deleted.
+ * <p ><b>Note:</b> This may not be supported or may not be reliable in
+ * certain environments, such as Java, where the implementation has no
+ * real control over when objects are actually deleted.
*/
public static final short NODE_DELETED = 3;
/**
1.1 xml-xerces/java/src/dom3/org/w3c/dom/DOMImplementationList.java
Index: DOMImplementationList.java
===================================================================
/*
* Copyright (c) 2003 World Wide Web Consortium,
*
* (Massachusetts Institute of Technology, European Research Consortium for
* Informatics and Mathematics, Keio University). All Rights Reserved. This
* work is distributed under the W3C(r) Software License [1] 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.
*
* [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
*
* The <code>DOMImplementationList</code> interface provides the abstraction
* of an ordered collection of DOM implementations, without defining or
* constraining how this collection is implemented. The items in the
* <code>DOMImplementationList</code> are accessible via an integral index,
* starting from 0.
* <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface DOMImplementationList {
/**
* Returns the <code>index</code>th item in the collection. If
* <code>index</code> is greater than or equal to the number of
* <code>DOMImplementation</code>s in the list, this returns
* <code>null</code>.
* @param index Index into the collection.
* @return The <code>DOMImplementation</code> at the <code>index</code>
* th position in the <code>DOMImplementationList</code>, or
* <code>null</code> if that is not a valid index.
*/
public DOMImplementation item(int index);
/**
* The number of <code>DOMImplementation</code>s in the list. The range
* of valid child node indices is 0 to <code>length-1</code> inclusive.
*/
public int getLength();
}
1.1 xml-xerces/java/src/dom3/org/w3c/dom/DOMStringList.java
Index: DOMStringList.java
===================================================================
/*
* Copyright (c) 2003 World Wide Web Consortium,
*
* (Massachusetts Institute of Technology, European Research Consortium for
* Informatics and Mathematics, Keio University). All Rights Reserved. This
* work is distributed under the W3C(r) Software License [1] 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.
*
* [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
*
* The <code>DOMStringList</code> interface provides the abstraction of an
* ordered collection of parallel pairs of name and namespace values,
* without defining or constraining how this collection is implemented. The
* items in the <code>DOMStringList</code> are accessible via an integral
* index, starting from 0.
* <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface DOMStringList {
/**
* Returns the <code>index</code>th item in the collection. If
* <code>index</code> is greater than or equal to the number of
* <code>DOMString</code>s in the list, this returns <code>null</code>.
* @param index Index into the collection.
* @return The <code>DOMString</code> at the <code>index</code>th
* position in the <code>DOMStringList</code>, or <code>null</code> if
* that is not a valid index.
*/
public String item(int index);
/**
* The number of <code>DOMString</code>s in the list. The range of valid
* child node indices is 0 to <code>length-1</code> inclusive.
*/
public int getLength();
}
1.1 xml-xerces/java/src/dom3/org/w3c/dom/NameList.java
Index: NameList.java
===================================================================
/*
* Copyright (c) 2003 World Wide Web Consortium,
*
* (Massachusetts Institute of Technology, European Research Consortium for
* Informatics and Mathematics, Keio University). All Rights Reserved. This
* work is distributed under the W3C(r) Software License [1] 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.
*
* [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
*
* The <code>NameList</code> interface provides the abstraction of an ordered
* collection of parallel pairs of name and namespace values, without
* defining or constraining how this collection is implemented. The items in
* the <code>NameList</code> are accessible via an integral index, starting
* from 0.
* <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface NameList {
/**
* Returns the <code>index</code>th name item in the collection.
* @param index Index into the collection.
* @return The <code>DOMString</code> at the <code>index</code>th
* position in the <code>NameList</code>.
* @exception DOMException
* INDEX_SIZE_ERR: If <code>index</code> is greater than or equal to
* the number of nodes in the list.
*/
public String getName(int index)
throws DOMException;
/**
* Returns the <code>index</code>th namespaceURI item in the collection.
* @param index Index into the collection.
* @return The <code>DOMString</code> at the <code>index</code>th
* position in the <code>NameList</code>.
* @exception DOMException
* INDEX_SIZE_ERR: If <code>index</code> is greater than or equal to
* the number of nodes in the list.
*/
public String getNamespaceURI(int index)
throws DOMException;
/**
* The number of pairs (name and namespaceURI) in the list. The range of
* valid child node indices is 0 to <code>length-1</code> inclusive.
*/
public int getLength();
}
1.1 xml-xerces/java/src/dom3/org/w3c/dom/bootstrap/DOMImplementationListImpl.java
Index: DOMImplementationListImpl.java
===================================================================
/*
* Copyright (c) 2003 World Wide Web Consortium,
*
* (Massachusetts Institute of Technology, European Research Consortium for
* Informatics and Mathematics, Keio University). All Rights Reserved. This
* work is distributed under the W3C(r) Software License [1] 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.
*
* [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
/**
* This class holds a list of DOMImplementations.
*
* @since DOM Level 3
*/
package org.w3c.dom.bootstrap;
import java.util.Vector;
import org.w3c.dom.DOMImplementationList;
import org.w3c.dom.DOMImplementation;
public class DOMImplementationListImpl
implements DOMImplementationList {
private Vector sources;
/*
* Construct an empty list of DOMImplementations
* @return an initialized instance of DOMImplementationRegistry
*/
public DOMImplementationListImpl()
{
sources = new Vector();
}
/**
* Returns the <code>index</code>th item in the collection. If
* <code>index</code> is greater than or equal to the number of
* <code>DOMImplementation</code>s in the list, this returns
* <code>null</code>.
* @param index Index into the collection.
* @return The <code>DOMImplementation</code> at the <code>index</code>
* th position in the <code>DOMImplementationList</code>, or
* <code>null</code> if that is not a valid index.
*/
public DOMImplementation item(int index)
{
try {
return (DOMImplementation) sources.elementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
return null;
}
}
/**
* The number of <code>DOMImplementation</code>s in the list. The range
* of valid child node indices is 0 to <code>length-1</code> inclusive.
*/
public int getLength() {
return sources.size();
}
/**
* Add a <code>DOMImplementation</code> in the list.
*/
protected void add(DOMImplementation domImpl) {
sources.add(domImpl);
}
}
1.1 xml-xerces/java/src/dom3/org/w3c/dom/bootstrap/DOMImplementationRegistry.java
Index: DOMImplementationRegistry.java
===================================================================
/*
* Copyright (c) 2003 World Wide Web Consortium,
*
* (Massachusetts Institute of Technology, European Research Consortium for
* Informatics and Mathematics, Keio University). All Rights Reserved. This
* work is distributed under the W3C(r) Software License [1] 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.
*
* [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
/**
* DOM Level 3 WD Experimental:
* The DOM Level 3 specification is at the stage
* of Working Draft, which represents work in
* progress and thus may be updated, replaced,
* or obsoleted by other documents at any time.
*
* This class holds the list of registered DOMImplementations. The contents
* of the registry are drawn from the System Property
* <code>org.w3c.dom.DOMImplementationSourceList</code>, which must contain a
* white-space delimited sequence of the names of classes implementing
* <code>DOMImplementationSource</code>.
* Applications may also register DOMImplementationSource
* implementations by using a method on this class. They may then
* query instances of the registry for implementations supporting
* specific features.</p>
*
* <p>This provides an application with an implementation-independent
* starting point.
*
* @see DOMImplementation
* @see DOMImplementationSource
* @since DOM Level 3
*/
package org.w3c.dom.bootstrap;
import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException;
import java.lang.ClassLoader;
import java.lang.String;
import java.util.StringTokenizer;
import java.util.Enumeration;
import java.util.Hashtable;
import org.w3c.dom.DOMImplementationSource;
import org.w3c.dom.DOMImplementationList;
import org.w3c.dom.DOMImplementation;
public class DOMImplementationRegistry {
// The system property to specify the DOMImplementationSource class names.
public final static String PROPERTY =
"org.w3c.dom.DOMImplementationSourceList";
private Hashtable sources;
// deny construction by other classes
private DOMImplementationRegistry() {
}
// deny construction by other classes
private DOMImplementationRegistry(Hashtable srcs) {
sources = srcs;
}
/*
* This method queries the System property
* <code>org.w3c.dom.DOMImplementationSourceList</code>. If it is
* able to read and parse the property, it attempts to instantiate
* classes according to each space-delimited substring. Any
* exceptions it encounters are thrown to the application. An application
* must call this method before using the class.
* @return an initialized instance of DOMImplementationRegistry
*/
public static DOMImplementationRegistry newInstance()
throws ClassNotFoundException, InstantiationException,
IllegalAccessException
{
Hashtable sources = new Hashtable();
// fetch system property:
String p = System.getProperty(PROPERTY);
if (p != null) {
StringTokenizer st = new StringTokenizer(p);
while (st.hasMoreTokens()) {
String sourceName = st.nextToken();
// Use context class loader, falling back to Class.forName
// if and only if this fails...
Object source = getClass(sourceName).newInstance();
sources.put(sourceName, source);
}
}
return new DOMImplementationRegistry(sources);
}
/**
* Return the first registered implementation that has the desired
* features, or null if none is found.
*
* @param features A string that specifies which features are required.
* This is a space separated list in which each feature is
* specified by its name optionally followed by a space
* and a version number.
* This is something like: "XML 1.0 Traversal Events 2.0"
* @return An implementation that has the desired features, or
* <code>null</code> if this source has none.
*/
public DOMImplementation getDOMImplementation(String features)
throws ClassNotFoundException,
InstantiationException, IllegalAccessException, ClassCastException
{
Enumeration names = sources.keys();
String name = null;
while(names.hasMoreElements()) {
name = (String)names.nextElement();
DOMImplementationSource source =
(DOMImplementationSource) sources.get(name);
DOMImplementation impl = source.getDOMImplementation(features);
if (impl != null) {
return impl;
}
}
return null;
}
/**
* Return the list of all registered implementation that support the desired
* features.
*
* @param features A string that specifies which features are required.
* This is a space separated list in which each feature is
* specified by its name optionally followed by a space
* and a version number.
* This is something like: "XML 1.0 Traversal Events 2.0"
* @return A list of DOMImplementations that support the desired features.
*/
public DOMImplementationList getDOMImplementations(String features)
throws ClassNotFoundException,
InstantiationException, IllegalAccessException, ClassCastException
{
Enumeration names = sources.keys();
DOMImplementationListImpl list = new DOMImplementationListImpl();
String name = null;
while(names.hasMoreElements()) {
name = (String)names.nextElement();
DOMImplementationSource source =
(DOMImplementationSource) sources.get(name);
DOMImplementation impl = source.getDOMImplementation(features);
if (impl != null) {
list.add(impl);
}
}
return list;
}
/**
* Register an implementation.
*/
public void addSource(DOMImplementationSource s)
throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
String sourceName = s.getClass().getName();
sources.put(sourceName, s);
}
private static Class getClass (String className)
throws ClassNotFoundException, IllegalAccessException,
InstantiationException {
Method m = null;
ClassLoader cl = null;
try {
m = Thread.class.getMethod("getContextClassLoader", null);
} catch (NoSuchMethodException e) {
// Assume that we are running JDK 1.1, use the current ClassLoader
cl = DOMImplementationRegistry.class.getClassLoader();
}
if (cl == null ) {
try {
cl = (ClassLoader) m.invoke(Thread.currentThread(), null);
} catch (IllegalAccessException e) {
// assert(false)
throw new UnknownError(e.getMessage());
} catch (InvocationTargetException e) {
// assert(e.getTargetException() instanceof SecurityException)
throw new UnknownError(e.getMessage());
}
}
if (cl == null) {
// fall back to Class.forName
return Class.forName(className);
}
try {
return cl.loadClass(className);
} catch (ClassNotFoundException e) {
return Class.forName(className);
}
}
}
1.52 +5 -2 xml-xerces/java/src/org/apache/xerces/dom/AttrImpl.java
Index: AttrImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/AttrImpl.java,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- AttrImpl.java 19 Feb 2003 21:56:12 -0000 1.51
+++ AttrImpl.java 20 Mar 2003 00:38:29 -0000 1.52
@@ -244,10 +244,13 @@
* @param id
*/
public void setIdAttribute(boolean id){
+ if (needsSyncData()) {
+ synchronizeData();
+ }
isIdAttribute(id);
}
/** DOM Level 3: isId*/
- public boolean getIsId(){
+ public boolean isId(){
// REVISIT: should an attribute that is not in the tree return
// isID true?
return isIdAttribute();
1.22 +6 -15 xml-xerces/java/src/org/apache/xerces/dom/CoreDOMImplementationImpl.java
Index: CoreDOMImplementationImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/CoreDOMImplementationImpl.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- CoreDOMImplementationImpl.java 8 Jan 2003 21:21:26 -0000 1.21
+++ CoreDOMImplementationImpl.java 20 Mar 2003 00:38:29 -0000 1.22
@@ -60,6 +60,7 @@
import org.w3c.dom.Document;
import org.w3c.dom.DocumentType;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
// DOM L3 LS
import org.w3c.dom.ls.DOMImplementationLS;
import org.w3c.dom.ls.DOMBuilder;
@@ -262,28 +263,18 @@
doc.appendChild(e);
return doc;
}
+
/**
* DOM Level 3 WD - Experimental.
- * This method makes available a <code>DOMImplementation</code>'s
- * specialized interface (see ).
- * @param feature The name of the feature requested (case-insensitive).
- * @return Returns an alternate <code>DOMImplementation</code> which
- * implements the specialized APIs of the specified feature, if any,
- * or <code>null</code> if there is no alternate
- * <code>DOMImplementation</code> object which implements interfaces
- * associated with that feature. Any alternate
- * <code>DOMImplementation</code> returned by this method must
- * delegate to the primary core <code>DOMImplementation</code> and not
- * return results inconsistent with the primary
- * <code>DOMImplementation</code>
- */
- public DOMImplementation getInterface(String feature) {
+ */
+ public Node getFeature(String feature, String version) {
String msg =
DOMMessageFormatter.formatMessage(
DOMMessageFormatter.DOM_DOMAIN,
"NOT_SUPPORTED_ERR",
null);
throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
+
}
// DOM L3 LS
/**
1.8 +21 -4 xml-xerces/java/src/org/apache/xerces/dom/DOMImplementationSourceImpl.java
Index: DOMImplementationSourceImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/DOMImplementationSourceImpl.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- DOMImplementationSourceImpl.java 4 Sep 2002 19:02:05 -0000 1.7
+++ DOMImplementationSourceImpl.java 20 Mar 2003 00:38:29 -0000 1.8
@@ -58,11 +58,10 @@
package org.apache.xerces.dom;
import org.w3c.dom.DOMImplementation;
-import org.apache.xerces.dom3.DOMImplementationRegistry;
+import org.apache.xerces.dom3.DOMImplementationList;
+import org.apache.xerces.dom3.bootstrap.DOMImplementationRegistry;
import org.apache.xerces.dom3.DOMImplementationSource;
-import org.apache.xerces.dom.CoreDOMImplementationImpl;
-import org.apache.xerces.dom.DOMImplementationImpl;
import java.util.StringTokenizer;
@@ -106,6 +105,24 @@
}
return null;
}
+
+ public DOMImplementationList getDOMImplementations(String features) {
+ // first check whether the CoreDOMImplementation would do
+ DOMImplementation impl = CoreDOMImplementationImpl.getDOMImplementation();
+ DOMImplementationListImpl list = new DOMImplementationListImpl();
+ if (testImpl(impl, features)) {
+ list.add(impl);
+ }
+ impl = DOMImplementationImpl.getDOMImplementation();
+ if (testImpl(impl, features)) {
+ list.add(impl);
+ }
+ impl = PSVIDOMImplementationImpl.getDOMImplementation();
+ if (testImpl(impl, features)) {
+ list.add(impl);
+ }
+ return list;
+ }
boolean testImpl(DOMImplementation impl, String features) {
1.7 +11 -16 xml-xerces/java/src/org/apache/xerces/dom/DOMLocatorImpl.java
Index: DOMLocatorImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/DOMLocatorImpl.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DOMLocatorImpl.java 23 Aug 2002 20:14:38 -0000 1.6
+++ DOMLocatorImpl.java 20 Mar 2003 00:38:29 -0000 1.7
@@ -83,12 +83,6 @@
public int fColumnNumber = -1;
/**
- * The DOM Node where the error occured, or
- * null if there is no Node available.
- */
- public Node fErrorNode = null;
-
- /**
* The line number where the error occured,
* or -1 if there is no line number available.
*/
@@ -101,6 +95,9 @@
* is parsed then the offset will be the character offset
*/
public int fOffset = -1;
+
+ /** related data node*/
+ public Node fRelatedNode = null;
/**
* The URI where the error occured,
@@ -121,11 +118,11 @@
fUri = uri;
} // DOMLocatorImpl (int lineNumber, int columnNumber, String uri )
- public DOMLocatorImpl (int lineNumber, int columnNumber, int offset, Node errorNode, String uri ){
+ public DOMLocatorImpl (int lineNumber, int columnNumber, int offset, Node relatedData, String uri ){
fLineNumber = lineNumber ;
fColumnNumber = columnNumber ;
fOffset = offset ;
- fErrorNode = errorNode ;
+ fRelatedNode = relatedData ;
fUri = uri;
} // DOMLocatorImpl (int lineNumber, int columnNumber, int offset, Node errorNode, String uri )
@@ -154,13 +151,7 @@
public int getOffset(){
return fOffset;
}
- /**
- * The DOM Node where the error occured, or null if there is no Node
- * available.
- */
- public Node getErrorNode(){
- return fErrorNode;
- }
+
/**
* The URI where the error occured, or null if there is no URI available.
@@ -169,6 +160,10 @@
return fUri;
}
+
+ public Node getRelatedNode(){
+ return fRelatedNode;
+ }
}// class DOMLocatorImpl
1.32 +2 -2 xml-xerces/java/src/org/apache/xerces/dom/DOMNormalizer.java
Index: DOMNormalizer.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/DOMNormalizer.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- DOMNormalizer.java 17 Feb 2003 18:59:45 -0000 1.31
+++ DOMNormalizer.java 20 Mar 2003 00:38:29 -0000 1.32
@@ -878,7 +878,7 @@
fDOMError.fMessage = message;
fDOMError.fSeverity = severity;
fDOMError.fLocator = fLocator;
- fLocator.fErrorNode = node;
+ fLocator.fRelatedNode = node;
return fDOMError;
}
1.65 +27 -22 xml-xerces/java/src/org/apache/xerces/dom/NodeImpl.java
Index: NodeImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/NodeImpl.java,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- NodeImpl.java 24 Jan 2003 15:48:17 -0000 1.64
+++ NodeImpl.java 20 Mar 2003 00:38:29 -0000 1.65
@@ -1450,11 +1450,9 @@
* Look up the prefix associated to the given namespace URI, starting from this node.
*
* @param namespaceURI
- * @param useDefault
* @return the prefix for the namespace
*/
- public String lookupNamespacePrefix(String namespaceURI,
- boolean useDefault){
+ public String lookupPrefix(String namespaceURI){
// REVISIT: When Namespaces 1.1 comes out this may not be true
// Prefix can't be bound to null namespace
@@ -1468,10 +1466,10 @@
case Node.ELEMENT_NODE: {
String namespace = this.getNamespaceURI(); // to flip out children
- return lookupNamespacePrefix(namespaceURI, useDefault, (ElementImpl)this);
+ return lookupNamespacePrefix(namespaceURI, (ElementImpl)this);
}
case Node.DOCUMENT_NODE:{
- return((NodeImpl)((Document)this).getDocumentElement()).lookupNamespacePrefix(namespaceURI, useDefault);
+ return((NodeImpl)((Document)this).getDocumentElement()).lookupPrefix(namespaceURI);
}
case Node.ENTITY_NODE :
@@ -1482,7 +1480,7 @@
return null;
case Node.ATTRIBUTE_NODE:{
if (this.ownerNode.getNodeType() == Node.ELEMENT_NODE) {
- return ownerNode.lookupNamespacePrefix(namespaceURI, useDefault);
+ return ownerNode.lookupPrefix(namespaceURI);
}
return null;
@@ -1490,7 +1488,7 @@
default:{
NodeImpl ancestor = (NodeImpl)getElementAncestor(this);
if (ancestor != null) {
- return ancestor.lookupNamespacePrefix(namespaceURI, useDefault);
+ return ancestor.lookupPrefix(namespaceURI);
}
return null;
}
@@ -1595,14 +1593,14 @@
return null;
}
- String lookupNamespacePrefix(String namespaceURI, boolean useDefault, ElementImpl el){
+ String lookupNamespacePrefix(String namespaceURI, ElementImpl el){
String namespace = this.getNamespaceURI();
// REVISIT: if no prefix is available is it null or empty string, or
// could be both?
String prefix = this.getPrefix();
if (namespace!=null && namespace.equals(namespaceURI)) {
- if (useDefault || prefix != null) {
+ if (prefix != null) {
String foundNamespace = el.lookupNamespaceURI(prefix);
if (foundNamespace !=null && foundNamespace.equals(namespaceURI)) {
return prefix;
@@ -1620,7 +1618,7 @@
namespace = attr.getNamespaceURI();
if (namespace !=null && namespace.equals("http://www.w3.org/2000/xmlns/")) {
// DOM Level 2 nodes
- if (((useDefault && attr.getNodeName().equals("xmlns")) ||
+ if (((attr.getNodeName().equals("xmlns")) ||
(attrPrefix !=null && attrPrefix.equals("xmlns")) &&
value.equals(namespaceURI))) {
@@ -1638,7 +1636,7 @@
NodeImpl ancestor = (NodeImpl)getElementAncestor(this);
if (ancestor != null) {
- return ancestor.lookupNamespacePrefix(namespaceURI, useDefault, el);
+ return ancestor.lookupNamespacePrefix(namespaceURI, el);
}
return null;
}
@@ -1752,22 +1750,29 @@
}
/**
- * This method makes available a <code>Node</code>'s specialized interface.
+ * This method returns a specialized object which implements the
+ * specialized APIs of the specified feature and version. The
+ * specialized object may also be obtained by using binding-specific
+ * casting methods but is not necessarily expected to, as discussed in Mixed DOM implementations.
* @param feature The name of the feature requested (case-insensitive).
- * @return Returns an alternate <code>Node</code> which implements the
- * specialized APIs of the specified feature, if any, or
- * <code>null</code> if there is no alternate <code>Node</code> which
- * implements interfaces associated with that feature. Any alternate
- * <code>Node</code> returned by this method must delegate to the
+ * @param version This is the version number of the feature to test. If
+ * the version is <code>null</code> or the empty string, supporting
+ * any version of the feature will cause the method to return an
+ * object that supports at least one version of the feature.
+ * @return Returns an object which implements the specialized APIs of
+ * the specified feature and version, if any, or <code>null</code> if
+ * there is no object which implements interfaces associated with that
+ * feature. If the <code>DOMObject</code> returned by this method
+ * implements the <code>Node</code> interface, it must delegate to the
* primary core <code>Node</code> and not return results inconsistent
- * with the primary core <code>Node</code> such as <code>key</code>,
- * <code>attributes</code>, <code>childNodes</code>, etc.
+ * with the primary core <code>Node</code> such as attributes,
+ * childNodes, etc.
* @since DOM Level 3
*/
- public Node getInterface(String feature) {
+ public Node getFeature(String feature, String version) {
// we don't have any alternate node, either this node does the job
// or we don't have anything that does
- return isSupported(feature, null) ? this : null;
+ return isSupported(feature, version) ? this : null;
}
/**
1.20 +2 -2 xml-xerces/java/src/org/apache/xerces/dom/TextImpl.java
Index: TextImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/TextImpl.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- TextImpl.java 19 Nov 2002 01:41:36 -0000 1.19
+++ TextImpl.java 20 Mar 2003 00:38:29 -0000 1.20
@@ -150,7 +150,7 @@
* Returns whether this text node contains whitespace in element content,
* often abusively called "ignorable whitespace".
*/
- public boolean getIsWhitespaceInElementContent(){
+ public boolean isWhitespaceInElementContent(){
// REVISIT: is this implemenation correct?
if (needsSyncData()) {
synchronizeData();
1.1 xml-xerces/java/src/org/apache/xerces/dom/DOMImplementationListImpl.java
Index: DOMImplementationListImpl.java
===================================================================
/*
* The Apache Software License, Version 1.1
*
*
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation and was
* originally based on software copyright (c) 2003, International
* Business Machines, Inc., http://www.apache.org. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.xerces.dom;
import java.util.Vector;
import org.apache.xerces.dom3.DOMImplementationList;
import org.w3c.dom.DOMImplementation;
/** DOM Level 3: implementation of DOMImplementationList */
public class DOMImplementationListImpl
implements DOMImplementationList {
private Vector sources;
/*
* Construct an empty list of DOMImplementations
* @return an initialized instance of DOMImplementationRegistry
*/
public DOMImplementationListImpl()
{
sources = new Vector();
}
/**
* Returns the <code>index</code>th item in the collection. If
* <code>index</code> is greater than or equal to the number of
* <code>DOMImplementation</code>s in the list, this returns
* <code>null</code>.
* @param index Index into the collection.
* @return The <code>DOMImplementation</code> at the <code>index</code>
* th position in the <code>DOMImplementationList</code>, or
* <code>null</code> if that is not a valid index.
*/
public DOMImplementation item(int index)
{
try {
return (DOMImplementation) sources.elementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
return null;
}
}
/**
* The number of <code>DOMImplementation</code>s in the list. The range
* of valid child node indices is 0 to <code>length-1</code> inclusive.
*/
public int getLength() {
return sources.size();
}
/**
* Add a <code>DOMImplementation</code> in the list.
*/
protected void add(DOMImplementation domImpl) {
sources.add(domImpl);
}
}
1.3 +13 -0 xml-xerces/java/src/org/apache/xerces/dom3/DOMImplementationSource.java
Index: DOMImplementationSource.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom3/DOMImplementationSource.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DOMImplementationSource.java 23 Aug 2002 20:14:39 -0000 1.2
+++ DOMImplementationSource.java 20 Mar 2003 00:38:30 -0000 1.3
@@ -39,5 +39,18 @@
* <code>null</code> if this source has none.
*/
public DOMImplementation getDOMImplementation(String features);
+
+ /**
+ * A method to request a list of DOM implementations that support the
+ * specified features.
+ * @param features A string that specifies which features are required.
+ * This is a space separated list in which each feature is specified
+ * by its name optionally followed by a space and a version number.
+ * This is something like: "XML 1.0 Traversal Events 2.0"
+ * @return A list of DOM implementations that support the desired
+ * features.
+ */
+ public DOMImplementationList getDOMImplementations(String features);
+
}
1.3 +2 -3 xml-xerces/java/src/org/apache/xerces/dom3/DOMLocator.java
Index: DOMLocator.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom3/DOMLocator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DOMLocator.java 23 Aug 2002 20:14:39 -0000 1.2
+++ DOMLocator.java 20 Mar 2003 00:38:30 -0000 1.3
@@ -48,10 +48,9 @@
public int getOffset();
/**
- * The DOM Node where the error occured, or null if there is no Node
- * available.
+ * The node this locator is pointing to, or null if no node is available
*/
- public Node getErrorNode();
+ public Node getRelatedNode();
/**
* The URI where the error occured, or null if there is no URI available.
1.1 xml-xerces/java/src/org/apache/xerces/dom3/DOMImplementationList.java
Index: DOMImplementationList.java
===================================================================
/*
* Copyright (c) 2003 World Wide Web Consortium,
*
* (Massachusetts Institute of Technology, European Research Consortium for
* Informatics and Mathematics, Keio University). All Rights Reserved. This
* work is distributed under the W3C(r) Software License [1] 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.
*
* [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.apache.xerces.dom3;
import org.w3c.dom.DOMImplementation;
/**
* The <code>DOMImplementationList</code> interface provides the abstraction
* of an ordered collection of DOM implementations, without defining or
* constraining how this collection is implemented. The items in the
* <code>DOMImplementationList</code> are accessible via an integral index,
* starting from 0.
* <p>See also the <a href='http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface DOMImplementationList {
/**
* Returns the <code>index</code>th item in the collection. If
* <code>index</code> is greater than or equal to the number of
* <code>DOMImplementation</code>s in the list, this returns
* <code>null</code>.
* @param index Index into the collection.
* @return The <code>DOMImplementation</code> at the <code>index</code>
* th position in the <code>DOMImplementationList</code>, or
* <code>null</code> if that is not a valid index.
*/
public DOMImplementation item(int index);
/**
* The number of <code>DOMImplementation</code>s in the list. The range
* of valid child node indices is 0 to <code>length-1</code> inclusive.
*/
public int getLength();
}
1.1 xml-xerces/java/src/org/apache/xerces/dom3/bootstrap/DOMImplementationListImpl.java
Index: DOMImplementationListImpl.java
===================================================================
/*
* Copyright (c) 2003 World Wide Web Consortium,
*
* (Massachusetts Institute of Technology, European Research Consortium for
* Informatics and Mathematics, Keio University). All Rights Reserved. This
* work is distributed under the W3C(r) Software License [1] 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.
*
* [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
/**
* This class holds a list of DOMImplementations.
*
* @since DOM Level 3
*/
package org.apache.xerces.dom3.bootstrap;
import java.util.Vector;
import org.apache.xerces.dom3.DOMImplementationList;
import org.w3c.dom.DOMImplementation;
public class DOMImplementationListImpl
implements DOMImplementationList {
private Vector sources;
/*
* Construct an empty list of DOMImplementations
* @return an initialized instance of DOMImplementationRegistry
*/
public DOMImplementationListImpl()
{
sources = new Vector();
}
/**
* Returns the <code>index</code>th item in the collection. If
* <code>index</code> is greater than or equal to the number of
* <code>DOMImplementation</code>s in the list, this returns
* <code>null</code>.
* @param index Index into the collection.
* @return The <code>DOMImplementation</code> at the <code>index</code>
* th position in the <code>DOMImplementationList</code>, or
* <code>null</code> if that is not a valid index.
*/
public DOMImplementation item(int index)
{
try {
return (DOMImplementation) sources.elementAt(index);
} catch (ArrayIndexOutOfBoundsException e) {
return null;
}
}
/**
* The number of <code>DOMImplementation</code>s in the list. The range
* of valid child node indices is 0 to <code>length-1</code> inclusive.
*/
public int getLength() {
return sources.size();
}
/**
* Add a <code>DOMImplementation</code> in the list.
*/
protected void add(DOMImplementation domImpl) {
sources.add(domImpl);
}
}
1.1 xml-xerces/java/src/org/apache/xerces/dom3/bootstrap/DOMImplementationRegistry.java
Index: DOMImplementationRegistry.java
===================================================================
/*
* Copyright (c) 2003 World Wide Web Consortium,
*
* (Massachusetts Institute of Technology, European Research Consortium for
* Informatics and Mathematics, Keio University). All Rights Reserved. This
* work is distributed under the W3C(r) Software License [1] 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.
*
* [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
/**
* This class holds the list of registered DOMImplementations. The contents
* of the registry are drawn from the System Property
* <code>org.w3c.dom.DOMImplementationSourceList</code>, which must contain a
* white-space delimited sequence of the names of classes implementing
* <code>DOMImplementationSource</code>.
* Applications may also register DOMImplementationSource
* implementations by using a method on this class. They may then
* query instances of the registry for implementations supporting
* specific features.</p>
*
* <p>This provides an application with an implementation-independent
* starting point.
*
* @see DOMImplementation
* @see DOMImplementationSource
* @since DOM Level 3
*/
package org.apache.xerces.dom3.bootstrap;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.StringTokenizer;
import org.apache.xerces.dom3.DOMImplementationList;
import org.apache.xerces.dom3.DOMImplementationSource;
import org.w3c.dom.DOMImplementation;
public class DOMImplementationRegistry {
// The system property to specify the DOMImplementationSource class names.
public final static String PROPERTY =
"org.w3c.dom.DOMImplementationSourceList";
private Hashtable sources;
// deny construction by other classes
private DOMImplementationRegistry() {
}
// deny construction by other classes
private DOMImplementationRegistry(Hashtable srcs) {
sources = srcs;
}
/*
* This method queries the System property
* <code>org.w3c.dom.DOMImplementationSourceList</code>. If it is
* able to read and parse the property, it attempts to instantiate
* classes according to each space-delimited substring. Any
* exceptions it encounters are thrown to the application. An application
* must call this method before using the class.
* @return an initialized instance of DOMImplementationRegistry
*/
public static DOMImplementationRegistry newInstance()
throws ClassNotFoundException, InstantiationException,
IllegalAccessException
{
Hashtable sources = new Hashtable();
// fetch system property:
String p = System.getProperty(PROPERTY);
if (p != null) {
StringTokenizer st = new StringTokenizer(p);
while (st.hasMoreTokens()) {
String sourceName = st.nextToken();
// Use context class loader, falling back to Class.forName
// if and only if this fails...
Object source = getClass(sourceName).newInstance();
sources.put(sourceName, source);
}
}
return new DOMImplementationRegistry(sources);
}
/**
* Return the first registered implementation that has the desired
* features, or null if none is found.
*
* @param features A string that specifies which features are required.
* This is a space separated list in which each feature is
* specified by its name optionally followed by a space
* and a version number.
* This is something like: "XML 1.0 Traversal Events 2.0"
* @return An implementation that has the desired features, or
* <code>null</code> if this source has none.
*/
public DOMImplementation getDOMImplementation(String features)
throws ClassNotFoundException,
InstantiationException, IllegalAccessException, ClassCastException
{
Enumeration names = sources.keys();
String name = null;
while(names.hasMoreElements()) {
name = (String)names.nextElement();
DOMImplementationSource source =
(DOMImplementationSource) sources.get(name);
DOMImplementation impl = source.getDOMImplementation(features);
if (impl != null) {
return impl;
}
}
return null;
}
/**
* Return the list of all registered implementation that support the desired
* features.
*
* @param features A string that specifies which features are required.
* This is a space separated list in which each feature is
* specified by its name optionally followed by a space
* and a version number.
* This is something like: "XML 1.0 Traversal Events 2.0"
* @return A list of DOMImplementations that support the desired features.
*/
public DOMImplementationList getDOMImplementations(String features)
throws ClassNotFoundException,
InstantiationException, IllegalAccessException, ClassCastException
{
Enumeration names = sources.keys();
DOMImplementationListImpl list = new DOMImplementationListImpl();
String name = null;
while(names.hasMoreElements()) {
name = (String)names.nextElement();
DOMImplementationSource source =
(DOMImplementationSource) sources.get(name);
DOMImplementation impl = source.getDOMImplementation(features);
if (impl != null) {
list.add(impl);
}
}
return list;
}
/**
* Register an implementation.
*/
public void addSource(DOMImplementationSource s)
throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
String sourceName = s.getClass().getName();
sources.put(sourceName, s);
}
private static Class getClass (String className)
throws ClassNotFoundException, IllegalAccessException,
InstantiationException {
Method m = null;
ClassLoader cl = null;
try {
m = Thread.class.getMethod("getContextClassLoader", null);
} catch (NoSuchMethodException e) {
// Assume that we are running JDK 1.1, use the current ClassLoader
cl = DOMImplementationRegistry.class.getClassLoader();
}
if (cl == null ) {
try {
cl = (ClassLoader) m.invoke(Thread.currentThread(), null);
} catch (IllegalAccessException e) {
// assert(false)
throw new UnknownError(e.getMessage());
} catch (InvocationTargetException e) {
// assert(e.getTargetException() instanceof SecurityException)
throw new UnknownError(e.getMessage());
}
}
if (cl == null) {
// fall back to Class.forName
return Class.forName(className);
}
try {
return cl.loadClass(className);
} catch (ClassNotFoundException e) {
return Class.forName(className);
}
}
}
1.5 +2 -2 xml-xerces/java/src/org/apache/xerces/impl/xs/opti/AttrImpl.java
Index: AttrImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/opti/AttrImpl.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- AttrImpl.java 16 Jan 2003 22:53:45 -0000 1.4
+++ AttrImpl.java 20 Mar 2003 00:38:30 -0000 1.5
@@ -126,7 +126,7 @@
/**
* @since DOM Level 3
*/
- public boolean getIsId(){
+ public boolean isId(){
return false;
}
1.5 +3 -4 xml-xerces/java/src/org/apache/xerces/impl/xs/opti/DefaultNode.java
Index: DefaultNode.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/opti/DefaultNode.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DefaultNode.java 24 Jan 2003 15:48:44 -0000 1.4
+++ DefaultNode.java 20 Mar 2003 00:38:30 -0000 1.5
@@ -224,8 +224,7 @@
throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
}
- public String lookupNamespacePrefix(String namespaceURI,
- boolean useDefault){
+ public String lookupPrefix(String namespaceURI){
throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
}
public boolean isDefaultNamespace(String namespaceURI){
@@ -241,7 +240,7 @@
}
- public Node getInterface(String feature){
+ public Node getFeature(String feature, String version){
return null;
}
public Object setUserData(String key, Object data, UserDataHandler handler){
1.8 +5 -5 xml-xerces/java/src/org/apache/xerces/util/DOMErrorHandlerWrapper.java
Index: DOMErrorHandlerWrapper.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/util/DOMErrorHandlerWrapper.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- DOMErrorHandlerWrapper.java 17 Jan 2003 22:40:54 -0000 1.7
+++ DOMErrorHandlerWrapper.java 20 Mar 2003 00:38:30 -0000 1.8
@@ -168,7 +168,7 @@
locator.fColumnNumber = exception.getColumnNumber();
locator.fLineNumber = exception.getLineNumber();
locator.fUri = exception.getExpandedSystemId();
- locator.fErrorNode = fCurrentNode;
+ locator.fRelatedNode = fCurrentNode;
}
fDomErrorHandler.handleError(fDOMError);
} // warning(String,String,XMLParseException)
@@ -200,7 +200,7 @@
locator.fColumnNumber = exception.getColumnNumber();
locator.fLineNumber = exception.getLineNumber();
locator.fUri = exception.getExpandedSystemId();
- locator.fErrorNode = fCurrentNode;
+ locator.fRelatedNode= fCurrentNode;
}
fDomErrorHandler.handleError(fDOMError);
} // error(String,String,XMLParseException)
@@ -240,7 +240,7 @@
locator.fColumnNumber = exception.getColumnNumber();
locator.fLineNumber = exception.getLineNumber();
locator.fUri = exception.getExpandedSystemId();
- locator.fErrorNode = fCurrentNode;
+ locator.fRelatedNode = fCurrentNode;
}
fDomErrorHandler.handleError(fDOMError);
} // fatalError(String,String,XMLParseException)
@@ -272,7 +272,7 @@
fOut.print(locator.getColumnNumber());
fOut.print(":");
fOut.print(locator.getOffset());
- Node node = locator.getErrorNode();
+ Node node = locator.getRelatedNode();
if (node != null) {
fOut.print("[");
fOut.print(node.getNodeName());
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org