mrglavas 2004/04/20 15:08:45
Modified: java/src/org/w3c/dom/ls LSOutput.java
LSSerializerFilter.java LSProgressEvent.java
LSResourceResolver.java LSSerializer.java
LSInput.java LSException.java LSParserFilter.java
LSParser.java LSLoadEvent.java
DOMImplementationLS.java
Log:
Updated to DOM Level 3 LS REC:
http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/
Next step is to move the API into xml-commons once we're ready
to build DOM Level 3 with the standard distribution.
Revision Changes Path
1.3 +3 -3 xml-xerces/java/src/org/w3c/dom/ls/LSOutput.java
Index: LSOutput.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/LSOutput.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LSOutput.java 23 Jan 2004 19:41:30 -0000 1.2
+++ LSOutput.java 20 Apr 2004 22:08:45 -0000 1.3
@@ -43,7 +43,7 @@
* <p> <code>LSOutput</code> objects belong to the application. The DOM
* implementation will never modify them (though it may make copies and
* modify the copies, if necessary).
- * <p>See also the <a
href='http://www.w3.org/2004/01/PR-DOM-Level-3-LS-20040112'>Document Object Model
(DOM) Level 3 Load
+ * <p>See also the <a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model
(DOM) Level 3 Load
and Save Specification</a>.
*/
public interface LSOutput {
@@ -86,7 +86,7 @@
/**
* The character encoding to use for the output. The encoding must be a
- * string acceptable for an XML encoding declaration ([<a
href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>] section
+ * string acceptable for an XML encoding declaration ([<a
href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] section
* 4.3.3 "Character Encoding in Entities"), it is recommended that
* character encodings registered (as charsets) with the Internet
* Assigned Numbers Authority [<a
href='ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets'>IANA-CHARSETS</a>]
@@ -95,7 +95,7 @@
public String getEncoding();
/**
* The character encoding to use for the output. The encoding must be a
- * string acceptable for an XML encoding declaration ([<a
href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>] section
+ * string acceptable for an XML encoding declaration ([<a
href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] section
* 4.3.3 "Character Encoding in Entities"), it is recommended that
* character encodings registered (as charsets) with the Internet
* Assigned Numbers Authority [<a
href='ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets'>IANA-CHARSETS</a>]
1.3 +14 -5 xml-xerces/java/src/org/w3c/dom/ls/LSSerializerFilter.java
Index: LSSerializerFilter.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/LSSerializerFilter.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LSSerializerFilter.java 23 Jan 2004 19:41:30 -0000 1.2
+++ LSSerializerFilter.java 20 Apr 2004 22:08:45 -0000 1.3
@@ -21,11 +21,11 @@
* based on the <code>NodeFilter</code> interface defined in [<a
href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>DOM Level 2
Traversal and Range</a>]
* .
* <p> <code>Document</code>, <code>DocumentType</code>,
- * <code>DocumentFragment</code>, <code>Notation</code>, and
- * <code>Entity</code> nodes are not passed to the filter. The child nodes
- * of an <code>EntityReference</code> node are only passed to the filter if
- * the <code>EntityReference</code> node is skipped by the method
- * <code>LSParserFilter.acceptNode()</code>.
+ * <code>DocumentFragment</code>, <code>Notation</code>, <code>Entity</code>
+ * , and children of <code>Attr</code> nodes are not passed to the filter.
+ * The child nodes of an <code>EntityReference</code> node are only passed
+ * to the filter if the <code>EntityReference</code> node is skipped by the
+ * method <code>LSParserFilter.acceptNode()</code>.
* <p> When serializing an <code>Element</code>, the element is passed to the
* filter before any of its attributes are passed to the filter. Namespace
* declaration attributes, and default attributes (except in the case when "
@@ -35,6 +35,12 @@
* <code>LSSerializerFilter</code> is implementation dependent.
* <p> DOM applications must not raise exceptions in a filter. The effect of
* throwing exceptions from a filter is DOM implementation dependent.
+ * <p> For efficiency, a node passed to the filter may not be the same as the
+ * one that is actually in the tree. And the actual node (node object
+ * identity) may be reused during the process of filtering and serializing a
+ * document.
+ * <p>See also the <a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model
(DOM) Level 3 Load
+and Save Specification</a>.
*/
public interface LSSerializerFilter extends NodeFilter {
/**
@@ -46,6 +52,9 @@
* , <code>SHOW_NOTATION</code>, and <code>SHOW_ENTITY</code> are
* meaningless here, such nodes will never be passed to a
* <code>LSSerializerFilter</code>.
+ * <br> Unlike [<a
href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>DOM Level 2
Traversal and Range</a>]
+ * , the <code>SHOW_ATTRIBUTE</code> constant indicates that the
+ * <code>Attr</code> nodes are shown and passed to the filter.
* <br> The constants used here are defined in [<a
href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>DOM Level 2
Traversal and Range</a>]
* .
*/
1.9 +2 -0 xml-xerces/java/src/org/w3c/dom/ls/LSProgressEvent.java
Index: LSProgressEvent.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/LSProgressEvent.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- LSProgressEvent.java 23 Jan 2004 19:41:30 -0000 1.8
+++ LSProgressEvent.java 20 Apr 2004 22:08:45 -0000 1.9
@@ -22,6 +22,8 @@
* <p> The units used for the attributes <code>position</code> and
* <code>totalSize</code> are not specified and can be implementation and
* input dependent.
+ * <p>See also the <a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model
(DOM) Level 3 Load
+and Save Specification</a>.
*/
public interface LSProgressEvent extends Event {
/**
1.3 +5 -3 xml-xerces/java/src/org/w3c/dom/ls/LSResourceResolver.java
Index: LSResourceResolver.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/LSResourceResolver.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LSResourceResolver.java 23 Jan 2004 19:41:30 -0000 1.2
+++ LSResourceResolver.java 20 Apr 2004 22:08:45 -0000 1.3
@@ -29,9 +29,11 @@
* <p> Many DOM applications will not need to implement this interface, but it
* will be especially useful for applications that build XML documents from
* databases or other specialized input sources, or for applications that
- * use URN's.
+ * use URNs.
* <p ><b>Note:</b> <code>LSResourceResolver</code> is based on the SAX2 [<a
href='http://www.saxproject.org/'>SAX</a>] <code>EntityResolver</code>
* interface.
+ * <p>See also the <a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model
(DOM) Level 3 Load
+and Save Specification</a>.
*/
public interface LSResourceResolver {
/**
@@ -48,9 +50,9 @@
* system identifiers to secure and/or local URI, to look up public
* identifiers in a catalogue, or to read an entity from a database or
* other input source (including, for example, a dialog box).
- * @param type The type of the resource being resolved. For XML [<a
href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>] resources
+ * @param type The type of the resource being resolved. For XML [<a
href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] resources
* (i.e. entities), applications must use the value
- * <code>"http://www.w3.org/TR/REC-xml"</code>, for XML Schema [<a
href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
+ * <code>"http://www.w3.org/TR/REC-xml"</code>. 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>. Other types of
* resources are outside the scope of this specification and therefore
1.3 +46 -35 xml-xerces/java/src/org/w3c/dom/ls/LSSerializer.java
Index: LSSerializer.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/LSSerializer.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LSSerializer.java 23 Jan 2004 19:41:30 -0000 1.2
+++ LSSerializer.java 20 Apr 2004 22:08:45 -0000 1.3
@@ -22,7 +22,7 @@
* output stream. Any changes or fixups made during the serialization affect
* only the serialized data. The <code>Document</code> object and its
* children are never altered by the serialization operation.
- * <p> During serialization of XML data, namespace fixup is done as defined in [DOM
Level 3 Core]
+ * <p> During serialization of XML data, namespace fixup is done as defined in [<a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
* , Appendix B. [<a
href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>DOM Level 2 Core</a>]
* allows empty strings as a real namespace URI. If the
* <code>namespaceURI</code> of a <code>Node</code> is empty string, the
@@ -71,7 +71,7 @@
* exact position and number of splits is not specified. If the parameter
* is set to <code>false</code>, unrepresentable characters in a
* <code>CDATAsection</code> are reported as
- * <code>"wf-invalid-character"</code> errors if the parameter "<a
href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-wellformed'>
+ * <code>"wf-invalid-character"</code> errors if the parameter "<a
href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-well-formed'>
* well-formed</a>" is set to <code>true</code>. The error is not recoverable -
there is no
* mechanism for supplying alternative characters and continuing with the
* serialization.
@@ -113,21 +113,35 @@
* well-formed</a>").
* <p> When requested by setting the parameter "<a
href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-normalize-characters'>
* normalize-characters</a>" on <code>LSSerializer</code> to true, character
normalization is
- * performed according to the rules defined in [<a
href='http://www.w3.org/TR/2003/WD-charmod-20030822/'>CharModel</a>] on
- * all data to be serialized, both markup and character data. The character
+ * performed according to the definition of <a
href='http://www.w3.org/TR/2004/REC-xml11-20040204/#dt-fullnorm'>fully
+ * normalized</a> characters included in appendix E of [<a
href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>] on all
+ * data to be serialized, both markup and character data. The character
* normalization process affects only the data as it is being written; it
* does not alter the DOM's view of the document after serialization has
* completed.
- * <p> When outputting unicode data, whether or not a byte order mark is
- * serialized, or if the output is big-endian or little-endian, is
- * implementation dependent.
+ * <p> Implementations are required to support the encodings "UTF-8",
+ * "UTF-16", "UTF-16BE", and "UTF-16LE" to guarantee that data is
+ * serializable in all encodings that are required to be supported by all
+ * XML parsers. When the encoding is UTF-8, whether or not a byte order mark
+ * is serialized, or if the output is big-endian or little-endian, is
+ * implementation dependent. When the encoding is UTF-16, whether or not the
+ * output is big-endian or little-endian is implementation dependent, but a
+ * Byte Order Mark must be generated for non-character outputs, such as
+ * <code>LSOutput.byteStream</code> or <code>LSOutput.systemId</code>. If
+ * the Byte Order Mark is not generated, a "byte-order-mark-needed" warning
+ * is reported. When the encoding is UTF-16LE or UTF-16BE, the output is
+ * big-endian (UTF-16BE) or little-endian (UTF-16LE) and the Byte Order Mark
+ * is not be generated. In all cases, the encoding declaration, if
+ * generated, will correspond to the encoding used during the serialization
+ * (e.g. <code>encoding="UTF-16"</code> will appear if UTF-16 was
+ * requested).
* <p> Namespaces are fixed up during serialization, the serialization process
* will verify that namespace declarations, namespace prefixes and the
* namespace URI associated with elements and attributes are consistent. If
* inconsistencies are found, the serialized form of the document will be
* altered to remove them. The method used for doing the namespace fixup
* while serializing a document is the algorithm defined in Appendix B.1,
- * "Namespace normalization", of [DOM Level 3 Core]
+ * "Namespace normalization", of [<a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
* .
* <p> While serializing a document, the parameter "discard-default-content"
* controls whether or not non-specified data is serialized.
@@ -159,13 +173,15 @@
* are expected to raise implementation specific errors and warnings for any
* other error and warning cases such as IO errors (file not found,
* permission denied,...) and so on.
+ * <p>See also the <a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model
(DOM) Level 3 Load
+and Save Specification</a>.
*/
public interface LSSerializer {
/**
* The <code>DOMConfiguration</code> object used by the
* <code>LSSerializer</code> when serializing a DOM node.
- * <br> In addition to the parameters recognized in on the <a
href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration'>
- * DOMConfiguration</a> interface defined in [DOM Level 3 Core]
+ * <br> In addition to the parameters recognized by the <a
href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration'>
+ * DOMConfiguration</a> interface defined in [<a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
* , the <code>DOMConfiguration</code> objects for
* <code>LSSerializer</code> adds, or modifies, the following
* parameters:
@@ -176,7 +192,7 @@
* <dt><code>true</code></dt>
* <dd>[<em>optional</em>] Writes the document according to the rules specified
in [<a href='http://www.w3.org/TR/2001/REC-xml-c14n-20010315'>Canonical XML</a>].
* In addition to the behavior described in "<a
href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-canonical-form'>
- * canonical-form</a>" [DOM Level 3 Core]
+ * canonical-form</a>" [<a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
* , setting this parameter to <code>true</code> will set the parameters
* "format-pretty-print", "discard-default-content", and "xml-declaration
* ", to <code>false</code>. Setting one of those parameters to
@@ -220,7 +236,7 @@
* <dl>
* <dt>
* <code>true</code></dt>
- * <dd>[<em>required</em>] (<em>default</em>) If, while verifying full
normalization when [<a href='http://www.w3.org/TR/2003/PR-xml11-20031105/'>XML
1.1</a>] is
+ * <dd>[<em>required</em>] (<em>default</em>) If, while verifying full
normalization when [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML
1.1</a>] is
* supported, a character is encountered for which the normalization
* properties cannot be determined, then raise a
* <code>"unknown-character-denormalization"</code> warning (instead of
@@ -234,13 +250,11 @@
* <dt>
* <code>"normalize-characters"</code></dt>
* <dd> This parameter is equivalent to
- * the one defined by <code>DOMConfiguration</code> in [DOM Level 3 Core]
+ * the one defined by <code>DOMConfiguration</code> in [<a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
* . Unlike in the Core, the default value for this parameter is
* <code>true</code>. While DOM implementations are not required to
- * support fully normalizing the characters in the document according to
- * the rules defined in [<a
href='http://www.w3.org/TR/2003/WD-charmod-20030822/'>CharModel</a>]
- * supplemented by the definitions of relevant constructs from Section
- * 2.13 of [<a href='http://www.w3.org/TR/2003/PR-xml11-20031105/'>XML
1.1</a>], this
+ * support <a
href='http://www.w3.org/TR/2004/REC-xml11-20040204/#dt-fullnorm'>fully
+ * normalizing</a> the characters in the document according to appendix E of
[<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>], this
* parameter must be activated by default if supported. </dd>
* <dt>
* <code>"xml-declaration"</code></dt>
@@ -258,7 +272,7 @@
* <code>false</code></dt>
* <dd>[<em>required</em>] Do not serialize the XML and text declarations.
Report a
* <code>"xml-declaration-needed"</code> warning if this will cause
- * problems (i.e. the serialized data is of an XML version other than [<a
href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>], or an
+ * problems (i.e. the serialized data is of an XML version other than [<a
href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>], or an
* encoding would be needed to be able to re-parse the serialized data). </dd>
* </dl></dd>
* </dl>
@@ -269,9 +283,9 @@
* The end-of-line sequence of characters to be used in the XML being
* written out. Any string is supported, but XML treats only a certain
* set of characters sequence as end-of-line (See section 2.11,
- * "End-of-Line Handling" in [<a
href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>], if the
+ * "End-of-Line Handling" in [<a
href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>], if the
* serialized content is XML 1.0 or section 2.11, "End-of-Line Handling"
- * in [<a href='http://www.w3.org/TR/2003/PR-xml11-20031105/'>XML 1.1</a>], if
the
+ * in [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>], if
the
* serialized content is XML 1.1). Using other character sequences than
* the recommended ones can result in a document that is either not
* serializable or not well-formed).
@@ -290,9 +304,9 @@
* The end-of-line sequence of characters to be used in the XML being
* written out. Any string is supported, but XML treats only a certain
* set of characters sequence as end-of-line (See section 2.11,
- * "End-of-Line Handling" in [<a
href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>], if the
+ * "End-of-Line Handling" in [<a
href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>], if the
* serialized content is XML 1.0 or section 2.11, "End-of-Line Handling"
- * in [<a href='http://www.w3.org/TR/2003/PR-xml11-20031105/'>XML 1.1</a>], if
the
+ * in [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>], if
the
* serialized content is XML 1.1). Using other character sequences than
* the recommended ones can result in a document that is either not
* serializable or not well-formed).
@@ -313,9 +327,9 @@
* to the filter before serializing each Node. The filter implementation
* can choose to remove the node from the stream or to terminate the
* serialization early.
- * <br> The filter is invoked before the operations requested by the
+ * <br> The filter is invoked after the operations requested by the
* <code>DOMConfiguration</code> parameters have been applied. For
- * example, CDATA sections are passed to the filter even if "<a
href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-cdata-sections'>
+ * example, CDATA sections won't be passed to the filter if "<a
href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-cdata-sections'>
* cdata-sections</a>" is set to <code>false</code>.
*/
public LSSerializerFilter getFilter();
@@ -324,9 +338,9 @@
* to the filter before serializing each Node. The filter implementation
* can choose to remove the node from the stream or to terminate the
* serialization early.
- * <br> The filter is invoked before the operations requested by the
+ * <br> The filter is invoked after the operations requested by the
* <code>DOMConfiguration</code> parameters have been applied. For
- * example, CDATA sections are passed to the filter even if "<a
href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-cdata-sections'>
+ * example, CDATA sections won't be passed to the filter if "<a
href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-cdata-sections'>
* cdata-sections</a>" is set to <code>false</code>.
*/
public void setFilter(LSSerializerFilter filter);
@@ -350,12 +364,8 @@
* </li>
* </ol>
* <br> If no encoding is reachable through the above properties, a
- * default encoding of "UTF-8" will be used.
- * <br> If the specified encoding is not supported an
- * "unsupported-encoding" fatal error is raised. When outputting XML
- * data, implementations are required to support the encodings "UTF-8",
- * "UTF-16BE", and "UTF-16LE" to guarantee that data is serializable in
- * all encodings that are required to be supported by all XML parsers.
+ * default encoding of "UTF-8" will be used. If the specified encoding
+ * is not supported an "unsupported-encoding" fatal error is raised.
* <br> If no output is specified in the <code>LSOutput</code>, a
* "no-output-specified" fatal error is raised.
* <br> The implementation is responsible of associating the appropriate
@@ -405,9 +415,10 @@
/**
* Serialize the specified node as described above in the general
* description of the <code>LSSerializer</code> interface. The output is
- * written to a <code>DOMString</code> that is returned to the caller
- * (this method completely ignores all the encoding information
- * available).
+ * written to a <code>DOMString</code> that is returned to the caller.
+ * The encoding used is the encoding of the <code>DOMString</code> type,
+ * i.e. UTF-16. Note that no Byte Order Mark is generated in a
+ * <code>DOMString</code> object.
* @param nodeArg The node to serialize.
* @return Returns the serialized data.
* @exception DOMException
1.3 +32 -20 xml-xerces/java/src/org/w3c/dom/ls/LSInput.java
Index: LSInput.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/LSInput.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LSInput.java 23 Jan 2004 19:41:30 -0000 1.2
+++ LSInput.java 20 Apr 2004 22:08:45 -0000 1.3
@@ -51,18 +51,24 @@
* <p> <code>LSInput</code> objects belong to the application. The DOM
* implementation will never modify them (though it may make copies and
* modify the copies, if necessary).
+ * <p>See also the <a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model
(DOM) Level 3 Load
+and Save Specification</a>.
*/
public interface LSInput {
/**
* An attribute of a language and binding dependent type that represents
* a stream of 16-bit units. The application must encode the stream
- * using UTF-16 (defined in [Unicode] and in [ISO/IEC 10646]).
+ * using UTF-16 (defined in [Unicode] and in [ISO/IEC 10646]). It is not a
requirement to have an XML declaration when
+ * using character streams. If an XML declaration is present, the value
+ * of the encoding attribute will be ignored.
*/
public java.io.Reader getCharacterStream();
/**
* An attribute of a language and binding dependent type that represents
* a stream of 16-bit units. The application must encode the stream
- * using UTF-16 (defined in [Unicode] and in [ISO/IEC 10646]).
+ * using UTF-16 (defined in [Unicode] and in [ISO/IEC 10646]). It is not a
requirement to have an XML declaration when
+ * using character streams. If an XML declaration is present, the value
+ * of the encoding attribute will be ignored.
*/
public void setCharacterStream(java.io.Reader characterStream);
@@ -87,24 +93,30 @@
/**
* String data to parse. If provided, this will always be treated as a
- * sequence of 16-bit units (UTF-16 encoded characters).
+ * sequence of 16-bit units (UTF-16 encoded characters). It is not a
+ * requirement to have an XML declaration when using
+ * <code>stringData</code>. If an XML declaration is present, the value
+ * of the encoding attribute will be ignored.
*/
public String getStringData();
/**
* String data to parse. If provided, this will always be treated as a
- * sequence of 16-bit units (UTF-16 encoded characters).
+ * sequence of 16-bit units (UTF-16 encoded characters). It is not a
+ * requirement to have an XML declaration when using
+ * <code>stringData</code>. If an XML declaration is present, the value
+ * of the encoding attribute will be ignored.
*/
public void setStringData(String stringData);
/**
* The system identifier, a URI reference [<a
href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>], for this
* input source. The system identifier is optional if there is a byte
- * stream, a character stream, or string data, but it is still useful to
+ * stream, a character stream, or string data. It is still useful to
* provide one, since the application will use it to resolve any
- * relative URIs and can include it in error messages and warnings (the
- * <code>LSParser</code> will only attempt to fetch the resource
- * identified by the URI reference if there is no other input available
- * in the input source).
+ * relative URIs and can include it in error messages and warnings. (The
+ * LSParser will only attempt to fetch the resource identified by the
+ * URI reference if there is no other input available in the input
+ * source.)
* <br> If the application knows the character encoding of the object
* pointed to by the system identifier, it can set the encoding using
* the <code>encoding</code> attribute.
@@ -118,12 +130,12 @@
/**
* The system identifier, a URI reference [<a
href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>], for this
* input source. The system identifier is optional if there is a byte
- * stream, a character stream, or string data, but it is still useful to
+ * stream, a character stream, or string data. It is still useful to
* provide one, since the application will use it to resolve any
- * relative URIs and can include it in error messages and warnings (the
- * <code>LSParser</code> will only attempt to fetch the resource
- * identified by the URI reference if there is no other input available
- * in the input source).
+ * relative URIs and can include it in error messages and warnings. (The
+ * LSParser will only attempt to fetch the resource identified by the
+ * URI reference if there is no other input available in the input
+ * source.)
* <br> If the application knows the character encoding of the object
* pointed to by the system identifier, it can set the encoding using
* the <code>encoding</code> attribute.
@@ -169,7 +181,7 @@
/**
* The character encoding, if known. The encoding must be a string
- * acceptable for an XML encoding declaration ([<a
href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>] section
+ * acceptable for an XML encoding declaration ([<a
href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] section
* 4.3.3 "Character Encoding in Entities").
* <br> This attribute has no effect when the application provides a
* character stream or string data. For other sources of input, an
@@ -180,7 +192,7 @@
public String getEncoding();
/**
* The character encoding, if known. The encoding must be a string
- * acceptable for an XML encoding declaration ([<a
href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>] section
+ * acceptable for an XML encoding declaration ([<a
href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] section
* 4.3.3 "Character Encoding in Entities").
* <br> This attribute has no effect when the application provides a
* character stream or string data. For other sources of input, an
@@ -192,14 +204,14 @@
/**
* If set to true, assume that the input is certified (see section 2.13
- * in [<a href='http://www.w3.org/TR/2003/PR-xml11-20031105/'>XML 1.1</a>])
when
- * parsing [<a href='http://www.w3.org/TR/2003/PR-xml11-20031105/'>XML
1.1</a>].
+ * in [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>])
when
+ * parsing [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML
1.1</a>].
*/
public boolean getCertifiedText();
/**
* If set to true, assume that the input is certified (see section 2.13
- * in [<a href='http://www.w3.org/TR/2003/PR-xml11-20031105/'>XML 1.1</a>])
when
- * parsing [<a href='http://www.w3.org/TR/2003/PR-xml11-20031105/'>XML
1.1</a>].
+ * in [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML 1.1</a>])
when
+ * parsing [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML
1.1</a>].
*/
public void setCertifiedText(boolean certifiedText);
1.2 +2 -0 xml-xerces/java/src/org/w3c/dom/ls/LSException.java
Index: LSException.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/LSException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- LSException.java 23 Jan 2004 19:41:30 -0000 1.1
+++ LSException.java 20 Apr 2004 22:08:45 -0000 1.2
@@ -23,6 +23,8 @@
* <code>DOMError</code> interface, a DOM implementation may choose to
* continue after a fatal error, but the resulting DOM tree is then
* implementation dependent.
+ * <p>See also the <a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model
(DOM) Level 3 Load
+and Save Specification</a>.
*/
public class LSException extends RuntimeException {
public LSException(short code, String message) {
1.3 +9 -13 xml-xerces/java/src/org/w3c/dom/ls/LSParserFilter.java
Index: LSParserFilter.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/LSParserFilter.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LSParserFilter.java 23 Jan 2004 19:41:30 -0000 1.2
+++ LSParserFilter.java 20 Apr 2004 22:08:45 -0000 1.3
@@ -12,8 +12,8 @@
package org.w3c.dom.ls;
-import org.w3c.dom.Element;
import org.w3c.dom.Node;
+import org.w3c.dom.Element;
/**
* <code>LSParserFilter</code>s provide applications the ability to examine
@@ -29,11 +29,9 @@
* <code>acceptNode</code> method on the filter. The child nodes of an
* <code>EntityReference</code> node are passed to the filter if the
* parameter "<a
href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-entities'>
- * entities</a>" is set to <code>false</code>, or if the
<code>EntityReference</code>
- * node is skipped by the method <code>LSParserFilter.acceptNode()</code>.
- * Note that, as described by the parameter "<a
href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-entities'>
- * entities</a>", entity reference nodes to non-defined entities are never
discarded and
- * are always passed to the filter.
+ * entities</a>" is set to <code>false</code>. Note that, as described by the
parameter "<a
href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-entities'>
+ * entities</a>", unexpanded entity reference nodes are never discarded and are
always
+ * passed to the filter.
* <p> All validity checking while parsing a document occurs on the source
* document as it appears on the input stream, not on the DOM document as it
* is built in memory. With filters, the document in memory may be a subset
@@ -44,6 +42,8 @@
* passed to the filter methods.
* <p> DOM applications must not raise exceptions in a filter. The effect of
* throwing exceptions from a filter is DOM implementation dependent.
+ * <p>See also the <a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model
(DOM) Level 3 Load
+and Save Specification</a>.
*/
public interface LSParserFilter {
// Constants returned by startElement and acceptNode
@@ -93,15 +93,11 @@
* </li>
* <li>
* <code>FILTER_REJECT</code> if the <code>Element</code> and all of
- * its children should be rejected. This return value will be ignored
- * if <code>element</code> is the documentElement, the documentElement
- * cannot be rejected.
+ * its children should be rejected.
* </li>
* <li> <code>FILTER_SKIP</code> if the
* <code>Element</code> should be skipped. All of its children are
- * inserted in place of the skipped <code>Element</code> node. This
- * return value will be ignored if <code>element</code> is the
- * documentElement, the documentElement cannot be skipped.
+ * inserted in place of the skipped <code>Element</code> node.
* </li>
* <li>
* <code>FILTER_INTERRUPT</code> if the filter wants to stop the
@@ -166,7 +162,7 @@
* definition of the constants. The constants <code>SHOW_ATTRIBUTE</code>
* , <code>SHOW_DOCUMENT</code>, <code>SHOW_DOCUMENT_TYPE</code>,
* <code>SHOW_NOTATION</code>, <code>SHOW_ENTITY</code>, and
- * <code>SHOW_DOCUMENT_FRAGMENT</code> are meaningless here, those nodes
+ * <code>SHOW_DOCUMENT_FRAGMENT</code> are meaningless here. Those nodes
* will never be passed to <code>LSParserFilter.acceptNode</code>.
* <br> The constants used here are defined in [<a
href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113'>DOM Level 2
Traversal and Range</a>]
* .
1.3 +44 -26 xml-xerces/java/src/org/w3c/dom/ls/LSParser.java
Index: LSParser.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/LSParser.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LSParser.java 23 Jan 2004 19:41:30 -0000 1.2
+++ LSParser.java 20 Apr 2004 22:08:45 -0000 1.3
@@ -24,7 +24,7 @@
* corresponding DOM document structure. A <code>LSParser</code> instance
* can be obtained by invoking the
* <code>DOMImplementationLS.createLSParser()</code> method.
- * <p> As specified in DOM Level 3 Core
+ * <p> As specified in [<a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
* , when a document is first made available via the LSParser:
* <ul>
* <li> there will
@@ -33,7 +33,7 @@
* </li>
* <li> it is expected that the <code>value</code> and
* <code>nodeValue</code> attributes of an <code>Attr</code> node initially
- * return the <a href='http://www.w3.org/TR/2000/REC-xml-20001006#AVNormalize'>XML
1.0
+ * return the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#AVNormalize'>XML
1.0
* normalized value</a>. However, if the parameters "<a
href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-validate-if-schema'>
* validate-if-schema</a>" and "<a
href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-datatype-normalization'>
* datatype-normalization</a>" are set to <code>true</code>, depending on the
attribute normalization
@@ -42,7 +42,7 @@
* datatype-normalization</a>" is set to <code>false</code>, the XML 1.0 attribute
normalization is
* guaranteed to occur, and if the attributes list does not contain
* namespace declarations, the <code>attributes</code> attribute on
- * <code>Element</code> node represents the property <b>[attributes]</b> defined in
[<a href='http://www.w3.org/TR/2001/REC-xml-infoset-20011024/'>XML Information Set</a>]
+ * <code>Element</code> node represents the property <b>[attributes]</b> defined in
[<a href='http://www.w3.org/TR/2004/REC-xml-infoset-20040204/'>XML Information Set</a>]
* .
* </li>
* </ul>
@@ -60,12 +60,12 @@
* <dd> The
* <code>LSParser</code> signals progress as data is parsed. This
* specification does not attempt to define exactly when progress events
- * should be dispatched, that is intentionally left as implementation
- * dependent, but here is one example of how an application might dispatch
- * progress events. Once the parser starts receiving data, a progress event
- * is dispatched to indicate that the parsing starts, then from there on, a
- * progress event is dispatched for every 4096 bytes of data that is
- * received and processed. This is only one example, though, and
+ * should be dispatched. That is intentionally left as
+ * implementation-dependent. Here is one example of how an application might
+ * dispatch progress events: Once the parser starts receiving data, a
+ * progress event is dispatched to indicate that the parsing starts. From
+ * there on, a progress event is dispatched for every 4096 bytes of data
+ * that is received and processed. This is only one example, though, and
* implementations can choose to dispatch progress events at any time while
* parsing, or not dispatch them at all. See also the definition of the
* <code>LSProgressEvent</code> interface. </dd>
@@ -82,7 +82,7 @@
* <dt>
* <code>"check-character-normalization-failure" [error]</code> </dt>
* <dd> Raised if
- * the paramter "<a
href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-check-character-normalization'>
+ * the parameter "<a
href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-check-character-normalization'>
* check-character-normalization</a>" is set to true and a string is encountered
that fails normalization
* checking. </dd>
* <dt><code>"doctype-not-allowed" [fatal]</code></dt>
@@ -135,21 +135,22 @@
* are expected to raise implementation specific errors and warnings for any
* other error and warning cases such as IO errors (file not found,
* permission denied,...), XML well-formedness errors, and so on.
+ * <p>See also the <a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model
(DOM) Level 3 Load
+and Save Specification</a>.
*/
public interface LSParser {
/**
* The <code>DOMConfiguration</code> object used when parsing an input
* source. This <code>DOMConfiguration</code> is specific to the parse
- * operation and no parameter values from this
- * <code>DOMConfiguration</code> object are passed automatically to the
- * <code>DOMConfiguration</code> object on the <code>Document</code>
- * that is created, or used, by the parse operation. The DOM application
- * is responsible for passing any needed parameter values from this
- * <code>DOMConfiguration</code> object to the
- * <code>DOMConfiguration</code> object referenced by the
+ * operation. No parameter values from this <code>DOMConfiguration</code>
+ * object are passed automatically to the <code>DOMConfiguration</code>
+ * object on the <code>Document</code> that is created, or used, by the
+ * parse operation. The DOM application is responsible for passing any
+ * needed parameter values from this <code>DOMConfiguration</code>
+ * object to the <code>DOMConfiguration</code> object referenced by the
* <code>Document</code> object.
* <br> In addition to the parameters recognized in on the <a
href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMConfiguration'>
- * DOMConfiguration</a> interface defined in DOM Level 3 Core
+ * DOMConfiguration</a> interface defined in [<a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
* , the <code>DOMConfiguration</code> objects for <code>LSParser</code>
* add or modify the following parameters:
* <dl>
@@ -162,7 +163,7 @@
* indication of the character encoding of the input stream being
* processed, that will override any encoding specified in the XML
* declaration or the Text declaration (see also section 4.3.3,
- * "Character Encoding in Entities", in [<a
href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>]).
+ * "Character Encoding in Entities", in [<a
href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]).
* Explicitly setting an encoding in the <code>LSInput</code> overrides
* any encoding from the protocol. </dd>
* <dt><code>false</code></dt>
@@ -186,11 +187,11 @@
* <dl>
* <dt>
* <code>true</code></dt>
- * <dd>[<em>required</em>] (<em>default</em>) If, while verifying full
normalization when [<a href='http://www.w3.org/TR/2003/PR-xml11-20031105/'>XML
1.1</a>] is
+ * <dd>[<em>required</em>] (<em>default</em>) If, while verifying full
normalization when [<a href='http://www.w3.org/TR/2004/REC-xml11-20040204/'>XML
1.1</a>] is
* supported, a processor encounters characters for which it cannot
* determine the normalization properties, then the processor will
* ignore any possible denormalizations caused by these characters.
- * This parameter is ignored for [<a
href='http://www.w3.org/TR/2000/REC-xml-20001006'>XML 1.0</a>]. </dd>
+ * This parameter is ignored for [<a
href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. </dd>
* <dt>
* <code>false</code></dt>
* <dd>[<em>optional</em>] Report an fatal
<b>"unknown-character-denormalization"</b> error if a character is encountered for
which the processor cannot
@@ -199,7 +200,7 @@
* <dt><code>"infoset"</code></dt>
* <dd> See
* the definition of <code>DOMConfiguration</code> for a description of
- * this parameter. Unlike in [DOM Level 3 Core]
+ * this parameter. Unlike in [<a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
* , this parameter will default to <code>true</code> for
* <code>LSParser</code>. </dd>
* <dt><code>"namespaces"</code></dt>
@@ -207,7 +208,7 @@
* <dl>
* <dt><code>true</code></dt>
* <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>]
- * and [<a href='http://www.w3.org/TR/2003/PR-xml-names11-20031105/'>XML
Namespaces 1.1</a>]
+ * and [<a href='http://www.w3.org/TR/2004/REC-xml-names11-20040204/'>XML
Namespaces 1.1</a>]
* . </dd>
* <dt><code>false</code></dt>
* <dd>[<em>optional</em>] Do not perform the namespace processing. </dd>
@@ -232,9 +233,26 @@
* <dt><code>false</code></dt>
* <dd>[<em>required</em>] (<em>default</em>) Accept any media type. </dd>
* </dl></dd>
+ * <dt><code>"validate"</code></dt>
+ * <dd> See the definition of
+ * <code>DOMConfiguration</code> for a description of this parameter.
+ * Unlike in [<a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+ * , the processing of the internal subset is always accomplished, even
+ * if this parameter is set to <code>false</code>. </dd>
+ * <dt>
+ * <code>"validate-if-schema"</code></dt>
+ * <dd> See the definition of
+ * <code>DOMConfiguration</code> for a description of this parameter.
+ * Unlike in [<a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+ * , the processing of the internal subset is always accomplished, even
+ * if this parameter is set to <code>false</code>. </dd>
+ * <dt>
+ * <code>"well-formed"</code></dt>
+ * <dd> See the definition of
+ * <code>DOMConfiguration</code> for a description of this parameter.
+ * Unlike in [<a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+ * , this parameter cannot be set to <code>false</code>. </dd>
* </dl>
- * <br> The parameter "<a
href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-well-formed'>
- * well-formed</a>" cannot be set to <code>false</code>.
*/
public DOMConfiguration getDomConfig();
@@ -414,7 +432,7 @@
* @exception DOMException
* HIERARCHY_REQUEST_ERR: Raised if the content cannot replace, be
* inserted before, after, or as a child of the context node (see also
- * <code>Node.insertBefore</code> or <code>Node.replaceChild</code> in [DOM
Level 3 Core]
+ * <code>Node.insertBefore</code> or <code>Node.replaceChild</code> in [<a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
* ).
* <br> NOT_SUPPORTED_ERR: Raised if the <code>LSParser</code> doesn't
* support this method, or if the context node is of type
1.9 +1 -1 xml-xerces/java/src/org/w3c/dom/ls/LSLoadEvent.java
Index: LSLoadEvent.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/LSLoadEvent.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- LSLoadEvent.java 23 Jan 2004 19:41:30 -0000 1.8
+++ LSLoadEvent.java 20 Apr 2004 22:08:45 -0000 1.9
@@ -18,7 +18,7 @@
/**
* This interface represents a load event object that signals the completion
* of a document load.
- * <p>See also the <a
href='http://www.w3.org/2004/01/PR-DOM-Level-3-LS-20040112'>Document Object Model
(DOM) Level 3 Load
+ * <p>See also the <a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model
(DOM) Level 3 Load
and Save Specification</a>.
*/
public interface LSLoadEvent extends Event {
1.10 +4 -2 xml-xerces/java/src/org/w3c/dom/ls/DOMImplementationLS.java
Index: DOMImplementationLS.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/DOMImplementationLS.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- DOMImplementationLS.java 23 Jan 2004 19:41:30 -0000 1.9
+++ DOMImplementationLS.java 20 Apr 2004 22:08:45 -0000 1.10
@@ -22,10 +22,12 @@
* binding-specific casting methods on an instance of the
* <code>DOMImplementation</code> interface or, if the <code>Document</code>
* supports the feature <code>"Core"</code> version <code>"3.0"</code>
- * defined in [DOM Level 3 Core]
+ * defined in [<a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
* , by using the method <code>DOMImplementation.getFeature</code> with
* parameter values <code>"LS"</code> (or <code>"LS-Async"</code>) and
* <code>"3.0"</code> (respectively).
+ * <p>See also the <a
href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model
(DOM) Level 3 Load
+and Save Specification</a>.
*/
public interface DOMImplementationLS {
// DOMImplementationLSMode
@@ -59,7 +61,7 @@
* <code>null</code>.
* <p ><b>Note:</b> For W3C 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>],
+ * <code>"http://www.w3.org/2001/XMLSchema"</code>. For XML DTD [<a
href='http://www.w3.org/TR/2004/REC-xml-20040204'>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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]