--- a/src/java.xml/share/classes/org/w3c/dom/ls/DOMImplementationLS.java Mon Dec 04 10:23:08 2017 +0900
+++ b/src/java.xml/share/classes/org/w3c/dom/ls/DOMImplementationLS.java Mon Dec 11 19:56:44 2017 -0800
@@ -51,12 +51,13 @@
* 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 [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+ * 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>.
+ * <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>.
*
* @since 1.5
*/
@@ -90,9 +91,11 @@
* <code>LSParser</code> for any kind of schema types (i.e. the
* LSParser will be free to use any schema found), use the value
* <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>]
+ * <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/2004/REC-xml-20040204'>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
@@ -102,8 +105,8 @@
* depending on the value of the <code>mode</code> argument.
* <p ><b>Note:</b> By default, the newly created <code>LSParser</code>
* does not contain a <code>DOMErrorHandler</code>, i.e. the value of
- * the "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
- * error-handler</a>" configuration parameter is <code>null</code>. However, implementations
+ * the "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-error-handler'>error-handler</a>"
+ * configuration parameter is <code>null</code>. However, implementations
* may provide a default error handler at creation time. In that case,
* the initial value of the <code>"error-handler"</code> configuration
* parameter on the new <code>LSParser</code> object contains a
--- a/src/java.xml/share/classes/org/w3c/dom/ls/LSParser.java Mon Dec 04 10:23:08 2017 +0900
+++ b/src/java.xml/share/classes/org/w3c/dom/ls/LSParser.java Mon Dec 11 19:56:44 2017 -0800
@@ -53,7 +53,8 @@
* corresponding DOM document structure. A <code>LSParser</code> instance
* can be obtained by invoking the
* <code>DOMImplementationLS.createLSParser()</code> method.
- * <p> As specified in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+ * <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
@@ -63,16 +64,18 @@
* <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/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
+ * normalized value</a>. However, if the parameters
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-validate-if-schema'>validate-if-schema</a>" and
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-datatype-normalization'>datatype-normalization</a>"
+ * are set to <code>true</code>, depending on the attribute normalization
* used, the attribute values may differ from the ones obtained by the XML
- * 1.0 attribute normalization. If the parameters "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-datatype-normalization'>
- * datatype-normalization</a>" is set to <code>false</code>, the XML 1.0 attribute normalization is
+ * 1.0 attribute normalization. If the parameters
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-datatype-normalization'>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/2004/REC-xml-infoset-20040204/'>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>
* <p> Asynchronous <code>LSParser</code> objects are expected to also
@@ -102,17 +105,18 @@
* <p ><b>Note:</b> All events defined in this specification use the
* namespace URI <code>"http://www.w3.org/2002/DOMLS"</code>.
* <p> While parsing an input source, errors are reported to the application
- * through the error handler (<code>LSParser.domConfig</code>'s "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
- * error-handler</a>" parameter). This specification does in no way try to define all possible
+ * through the error handler (<code>LSParser.domConfig</code>'s
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-error-handler'>error-handler</a>"
+ * parameter). This specification does in no way try to define all possible
* errors that can occur while parsing XML, or any other markup, but some
* common error cases are defined. The types (<code>DOMError.type</code>) of
* errors and warnings defined by this specification are:
* <dl>
* <dt>
* <code>"check-character-normalization-failure" [error]</code> </dt>
- * <dd> Raised if
- * 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
+ * <dd> Raised if the parameter
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/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>
* <dd> Raised if the
@@ -127,8 +131,9 @@
* <dd> Raised if a processing
* instruction is encountered in a location where the base URI of the
* processing instruction can not be preserved. One example of a case where
- * this warning will be raised is if the configuration parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-entities'>
- * entities</a>" is set to <code>false</code> and the following XML file is parsed:
+ * this warning will be raised is if the configuration parameter
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-entities'>entities</a>"
+ * is set to <code>false</code> and the following XML file is parsed:
* <pre>
* <!DOCTYPE root [ <!ENTITY e SYSTEM 'subdir/myentity.ent' ]>
* <root> &e; </root></pre>
@@ -139,9 +144,9 @@
* </dd>
* <dt><code>"unbound-prefix-in-entity" [warning]</code></dt>
* <dd> An
- * implementation dependent warning that may be raised if the configuration
- * parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-namespaces'>
- * namespaces</a>" is set to <code>true</code> and an unbound namespace prefix is
+ * implementation dependent warning that may be raised if the configuration parameter
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-namespaces'>namespaces</a>"
+ * is set to <code>true</code> and an unbound namespace prefix is
* encountered in an entity's replacement text. Raising this warning is not
* enforced since some existing parsers may not recognize unbound namespace
* prefixes in the replacement text of entities. </dd>
@@ -164,8 +169,8 @@
* 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>.
+ * <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>.
*
* @since 1.5
*/
@@ -180,8 +185,10 @@
* 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 [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+ * <br> In addition to the parameters recognized in on the
+ * <a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/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>LSParser</code>
* add or modify the following parameters:
* <dl>
@@ -190,7 +197,8 @@
* <dd>
* <dl>
* <dt><code>true</code></dt>
- * <dd>[<em>optional</em>] (<em>default</em>) If a higher level protocol such as HTTP [<a href='http://www.ietf.org/rfc/rfc2616.txt'>IETF RFC 2616</a>] provides an
+ * <dd>[<em>optional</em>] (<em>default</em>) If a higher level protocol such as HTTP
+ * [<a href='http://www.ietf.org/rfc/rfc2616.txt'>IETF RFC 2616</a>] provides an
* 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,
@@ -206,7 +214,8 @@
* <dl>
* <dt>
* <code>true</code></dt>
- * <dd>[<em>optional</em>] Throw a fatal <b>"doctype-not-allowed"</b> error if a doctype node is found while parsing the document. This is
+ * <dd>[<em>optional</em>] Throw a fatal <b>"doctype-not-allowed"</b> error
+ * if a doctype node is found while parsing the document. This is
* useful when dealing with things like SOAP envelopes where doctype
* nodes are not allowed. </dd>
* <dt><code>false</code></dt>
@@ -218,14 +227,17 @@
* <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/2004/REC-xml11-20040204/'>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/2004/REC-xml-20040204'>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
+ * <dd>[<em>optional</em>] Report an fatal <b>"unknown-character-denormalization"</b>
+ * error if a character is encountered for which the processor cannot
* determine the normalization properties. </dd>
* </dl></dd>
* <dt><code>"infoset"</code></dt>
@@ -238,7 +250,8 @@
* <dd>
* <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>]
+ * <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/2004/REC-xml-names11-20040204/'>XML Namespaces 1.1</a>]
* . </dd>
* <dt><code>false</code></dt>
@@ -259,7 +272,8 @@
* <code>true</code></dt>
* <dd>[<em>optional</em>] Check that the media type of the parsed resource is a supported media
* type. If an unsupported media type is encountered, a fatal error of
- * type <b>"unsupported-media-type"</b> will be raised. The media types defined in [<a href='http://www.ietf.org/rfc/rfc3023.txt'>IETF RFC 3023</a>] must always
+ * type <b>"unsupported-media-type"</b> will be raised. The media types defined in
+ * [<a href='http://www.ietf.org/rfc/rfc3023.txt'>IETF RFC 3023</a>] must always
* be accepted. </dd>
* <dt><code>false</code></dt>
* <dd>[<em>required</em>] (<em>default</em>) Accept any media type. </dd>
@@ -294,8 +308,8 @@
* terminate the parsing early.
* <br> The filter is invoked after the operations requested by the
* <code>DOMConfiguration</code> parameters have been applied. For
- * example, if "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-validate'>
- * validate</a>" is set to <code>true</code>, the validation is done before invoking the
+ * example, if "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-validate'>validate</a>"
+ * is set to <code>true</code>, the validation is done before invoking the
* filter.
*/
public LSParserFilter getFilter();
@@ -306,8 +320,8 @@
* terminate the parsing early.
* <br> The filter is invoked after the operations requested by the
* <code>DOMConfiguration</code> parameters have been applied. For
- * example, if "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-validate'>
- * validate</a>" is set to <code>true</code>, the validation is done before invoking the
+ * example, if "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-validate'>validate</a>"
+ * is set to <code>true</code>, the validation is done before invoking the
* filter.
*/
public void setFilter(LSParserFilter filter);
@@ -340,15 +354,18 @@
* @exception LSException
* PARSE_ERR: Raised if the <code>LSParser</code> was unable to load
* the XML document. DOM applications should attach a
- * <code>DOMErrorHandler</code> using the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
- * error-handler</a>" if they wish to get details on the error.
+ * <code>DOMErrorHandler</code> using the parameter
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-error-handler'>error-handler</a>"
+ * if they wish to get details on the error.
*/
public Document parse(LSInput input)
throws DOMException, LSException;
/**
- * Parse an XML document from a location identified by a URI reference [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]. If the URI
- * contains a fragment identifier (see section 4.1 in [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]), the
+ * Parse an XML document from a location identified by a URI reference
+ * [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]. If the URI
+ * contains a fragment identifier (see section 4.1 in
+ * [<a href='http://www.ietf.org/rfc/rfc2396.txt'>IETF RFC 2396</a>]), the
* behavior is not defined by this specification, future versions of
* this specification may define the behavior.
* @param uri The location of the XML document to be read.
@@ -364,8 +381,9 @@
* @exception LSException
* PARSE_ERR: Raised if the <code>LSParser</code> was unable to load
* the XML document. DOM applications should attach a
- * <code>DOMErrorHandler</code> using the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
- * error-handler</a>" if they wish to get details on the error.
+ * <code>DOMErrorHandler</code> using the parameter
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-error-handler'>error-handler</a>"
+ * if they wish to get details on the error.
*/
public Document parseURI(String uri)
throws DOMException, LSException;
@@ -431,14 +449,17 @@
* <code>LSParser</code> is asynchronous (<code>LSParser.async</code> is
* <code>true</code>).
* <br> If an error occurs while parsing, the caller is notified through
- * the <code>ErrorHandler</code> instance associated with the "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
- * error-handler</a>" parameter of the <code>DOMConfiguration</code>.
+ * the <code>ErrorHandler</code> instance associated with the
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-error-handler'>error-handler</a>"
+ * parameter of the <code>DOMConfiguration</code>.
* <br> When calling <code>parseWithContext</code>, the values of the
* following configuration parameters will be ignored and their default
- * values will always be used instead: "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-validate'>
- * validate</a>", "<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-element-content-whitespace'>
- * element-content-whitespace</a>". Other parameters will be treated normally, and the parser is expected
+ * values will always be used instead:
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-validate'>validate</a>",
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-validate-if-schema'>validate-if-schema</a>",
+ * and
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-element-content-whitespace'>element-content-whitespace</a>".
+ * Other parameters will be treated normally, and the parser is expected
* to call the <code>LSParserFilter</code> just as if a whole document
* was parsed.
* @param input The <code>LSInput</code> from which the source document
@@ -463,7 +484,8 @@
* @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 [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+ * <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
@@ -479,8 +501,9 @@
* @exception LSException
* PARSE_ERR: Raised if the <code>LSParser</code> was unable to load
* the XML fragment. DOM applications should attach a
- * <code>DOMErrorHandler</code> using the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
- * error-handler</a>" if they wish to get details on the error.
+ * <code>DOMErrorHandler</code> using the parameter
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-error-handler'>error-handler</a>"
+ * if they wish to get details on the error.
*/
public Node parseWithContext(LSInput input,
Node contextArg,
--- a/src/java.xml/share/classes/org/w3c/dom/ls/LSParserFilter.java Mon Dec 04 10:23:08 2017 +0900
+++ b/src/java.xml/share/classes/org/w3c/dom/ls/LSParserFilter.java Mon Dec 11 19:56:44 2017 -0800
@@ -56,10 +56,11 @@
* <code>Document</code>, <code>DocumentType</code>, <code>Notation</code>,
* <code>Entity</code>, and <code>Attr</code> nodes are never passed to the
* <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>. 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
+ * <code>EntityReference</code> node are passed to the filter if the parameter
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-entities'>entities</a>"
+ * is set to <code>false</code>. Note that, as described by the parameter
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/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
@@ -71,8 +72,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>.
+ * <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>.
*
* @since 1.5
*/
@@ -195,8 +196,8 @@
* <code>SHOW_NOTATION</code>, <code>SHOW_ENTITY</code>, and
* <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>]
- * .
+ * <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>].
*/
public int getWhatToShow();
--- a/src/java.xml/share/classes/org/w3c/dom/ls/LSSerializer.java Mon Dec 04 10:23:08 2017 +0900
+++ b/src/java.xml/share/classes/org/w3c/dom/ls/LSSerializer.java Mon Dec 11 19:56:44 2017 -0800
@@ -51,7 +51,8 @@
* 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 [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+ * <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
@@ -80,12 +81,14 @@
* namespace fixup is done. The resulting output will be valid as an
* external entity.
* </li>
- * <li> If the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-entities'>
- * entities</a>" is set to <code>true</code>, <code>EntityReference</code> nodes are
+ * <li> If the parameter
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-entities'>entities</a>"
+ * is set to <code>true</code>, <code>EntityReference</code> nodes are
* serialized as an entity reference of the form "
* <code>&entityName;</code>" in the output. Child nodes (the expansion)
- * of the entity reference are ignored. 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>, only the children of the entity reference
+ * of the entity reference are ignored. If the parameter
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-entities'>entities</a>"
+ * is set to <code>false</code>, only the children of the entity reference
* are serialized. <code>EntityReference</code> nodes with no children (no
* corresponding <code>Entity</code> node or the corresponding
* <code>Entity</code> nodes have no children) are always serialized.
@@ -93,15 +96,16 @@
* <li>
* <code>CDATAsections</code> containing content characters that cannot be
* represented in the specified output encoding are handled according to the
- * "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-split-cdata-sections'>
- * split-cdata-sections</a>" parameter. If the parameter is set to <code>true</code>,
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-split-cdata-sections'>split-cdata-sections</a>"
+ * parameter. If the parameter is set to <code>true</code>,
* <code>CDATAsections</code> are split, and the unrepresentable characters
* are serialized as numeric character references in ordinary content. The
* 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-well-formed'>
- * well-formed</a>" is set to <code>true</code>. The error is not recoverable - there is no
+ * <code>"wf-invalid-character"</code> errors if the parameter
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/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.
* </li>
@@ -138,12 +142,15 @@
* as a <code>DOMError</code> fatal error. An example would be serializing
* the element <LaCañada/> with <code>encoding="us-ascii"</code>.
* This will result with a generation of a <code>DOMError</code>
- * "wf-invalid-character-in-node-name" (as proposed in "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-well-formed'>
- * 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 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
+ * "wf-invalid-character-in-node-name" (as proposed in
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-well-formed'>well-formed</a>").
+ * <p> When requested by setting the parameter
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-normalize-characters'>normalize-characters</a>"
+ * on <code>LSSerializer</code> to true, character normalization is
+ * 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
@@ -170,13 +177,15 @@
* 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 [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+ * "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.
* <p> While serializing, errors and warnings are reported to the application
- * through the error handler (<code>LSSerializer.domConfig</code>'s "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
- * error-handler</a>" parameter). This specification does in no way try to define all possible
+ * through the error handler (<code>LSSerializer.domConfig</code>'s
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-error-handler'>error-handler</a>"
+ * parameter). This specification does in no way try to define all possible
* errors and warnings that can occur while serializing a DOM node, but some
* common error and warning cases are defined. The types (
* <code>DOMError.type</code>) of errors and warnings defined by this
@@ -189,8 +198,9 @@
* <dt>
* <code>"unbound-prefix-in-entity-reference" [fatal]</code> </dt>
* <dd> Raised if the
- * configuration parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-namespaces'>
- * namespaces</a>" is set to <code>true</code> and an entity whose replacement text
+ * configuration parameter
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-namespaces'>namespaces</a>"
+ * is set to <code>true</code> and an entity whose replacement text
* contains unbound namespace prefixes is referenced in a location where
* there are no bindings for the namespace prefixes. </dd>
* <dt>
@@ -202,8 +212,9 @@
* 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>.
+ * <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>.
*
* @since 1.5
*/
@@ -211,8 +222,10 @@
/**
* The <code>DOMConfiguration</code> object used by the
* <code>LSSerializer</code> when serializing a DOM node.
- * <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>]
+ * <br> In addition to the parameters recognized by the
+ * <a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/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:
@@ -221,9 +234,11 @@
* <dd>
* <dl>
* <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>" [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>DOM Level 3 Core</a>]
+ * <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='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-canonical-form'>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
@@ -267,7 +282,8 @@
* <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/2004/REC-xml11-20040204/'>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
@@ -281,18 +297,21 @@
* <dt>
* <code>"normalize-characters"</code></dt>
* <dd> This parameter is equivalent to
- * 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>]
+ * 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 <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
+ * 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>
* <dd>
* <dl>
* <dt><code>true</code></dt>
- * <dd>[<em>required</em>] (<em>default</em>) If a <code>Document</code>, <code>Element</code>, or <code>Entity</code>
+ * <dd>[<em>required</em>] (<em>default</em>) If a <code>Document</code>,
+ * <code>Element</code>, or <code>Entity</code>
* node is serialized, the XML declaration, or text declaration, should
* be included. The version (<code>Document.xmlVersion</code> if the
* document is a Level 3 document and the version is non-null, otherwise
@@ -303,7 +322,8 @@
* <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/2004/REC-xml-20040204'>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>
@@ -314,8 +334,8 @@
* 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/2004/REC-xml-20040204'>XML 1.0</a>], if the
- * serialized content is XML 1.0 or section 2.11, "End-of-Line Handling"
+ * "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/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
@@ -335,8 +355,8 @@
* 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/2004/REC-xml-20040204'>XML 1.0</a>], if the
- * serialized content is XML 1.0 or section 2.11, "End-of-Line Handling"
+ * "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/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
@@ -360,8 +380,9 @@
* serialization early.
* <br> The filter is invoked after the operations requested by the
* <code>DOMConfiguration</code> parameters have been applied. For
- * 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>.
+ * example, CDATA sections won't be passed to the filter if
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-cdata-sections'>cdata-sections</a>"
+ * is set to <code>false</code>.
*/
public LSSerializerFilter getFilter();
/**
@@ -371,8 +392,9 @@
* serialization early.
* <br> The filter is invoked after the operations requested by the
* <code>DOMConfiguration</code> parameters have been applied. For
- * 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>.
+ * example, CDATA sections won't be passed to the filter if
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-cdata-sections'>cdata-sections</a>"
+ * is set to <code>false</code>.
*/
public void setFilter(LSSerializerFilter filter);
@@ -414,8 +436,9 @@
* @exception LSException
* SERIALIZE_ERR: Raised if the <code>LSSerializer</code> was unable to
* serialize the node. DOM applications should attach a
- * <code>DOMErrorHandler</code> using the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
- * error-handler</a>" if they wish to get details on the error.
+ * <code>DOMErrorHandler</code> using the parameter
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-error-handler'>error-handler</a>"
+ * if they wish to get details on the error.
*/
public boolean write(Node nodeArg,
LSOutput destination)
@@ -436,8 +459,9 @@
* @exception LSException
* SERIALIZE_ERR: Raised if the <code>LSSerializer</code> was unable to
* serialize the node. DOM applications should attach a
- * <code>DOMErrorHandler</code> using the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
- * error-handler</a>" if they wish to get details on the error.
+ * <code>DOMErrorHandler</code> using the parameter
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-error-handler'>error-handler</a>"
+ * if they wish to get details on the error.
*/
public boolean writeToURI(Node nodeArg,
String uri)
@@ -458,8 +482,9 @@
* @exception LSException
* SERIALIZE_ERR: Raised if the <code>LSSerializer</code> was unable to
* serialize the node. DOM applications should attach a
- * <code>DOMErrorHandler</code> using the parameter "<a href='http://www.w3.org/TR/DOM-Level-3-Core/core.html#parameter-error-handler'>
- * error-handler</a>" if they wish to get details on the error.
+ * <code>DOMErrorHandler</code> using the parameter
+ * "<a href='https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#parameter-error-handler'>error-handler</a>"
+ * if they wish to get details on the error.
*/
public String writeToString(Node nodeArg)
throws DOMException, LSException;