# HG changeset patch
# User joehw
# Date 1513051004 28800
# Node ID 18d487a1f933733abdb24847b287b21e65ecd923
# Parent e9ad230ea4556aefb47c41d73fd28f82da5ef8f4
8190823: Broken link in org/w3c/dom/ls/
Reviewed-by: lancea
diff -r e9ad230ea455 -r 18d487a1f933 src/java.xml/share/classes/org/w3c/dom/ls/DOMImplementationLS.java
--- 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
* DOMImplementation
interface or, if the Document
* supports the feature "Core"
version "3.0"
- * defined in [DOM Level 3 Core]
+ * defined in
+ * [DOM Level 3 Core]
* , by using the method DOMImplementation.getFeature
with
* parameter values "LS"
(or "LS-Async"
) and
* "3.0"
(respectively).
- *
See also the Document Object Model (DOM) Level 3 Load -and Save Specification. + *
See also the
+Document Object Model (DOM) Level 3 Load and Save Specification.
*
* @since 1.5
*/
@@ -90,9 +91,11 @@
* LSParser
for any kind of schema types (i.e. the
* LSParser will be free to use any schema found), use the value
* null
.
- *
Note: For W3C XML Schema [XML Schema Part 1] + *
Note: For W3C XML Schema
+ * [XML Schema Part 1]
* , applications must use the value
- * "http://www.w3.org/2001/XMLSchema"
. For XML DTD [XML 1.0],
+ * "http://www.w3.org/2001/XMLSchema"
. For XML DTD
+ * [XML 1.0],
* applications must use the value
* "http://www.w3.org/TR/REC-xml"
. 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 mode
argument.
*
Note: By default, the newly created LSParser
* does not contain a DOMErrorHandler
, i.e. the value of
- * the "
- * error-handler" configuration parameter is null
. However, implementations
+ * the "error-handler"
+ * configuration parameter is null
. However, implementations
* may provide a default error handler at creation time. In that case,
* the initial value of the "error-handler"
configuration
* parameter on the new LSParser
object contains a
diff -r e9ad230ea455 -r 18d487a1f933 src/java.xml/share/classes/org/w3c/dom/ls/LSParser.java
--- 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 LSParser
instance
* can be obtained by invoking the
* DOMImplementationLS.createLSParser()
method.
- *
As specified in [DOM Level 3 Core] + *
As specified in + * [DOM Level 3 Core] * , when a document is first made available via the LSParser: *
value
and
* nodeValue
attributes of an Attr
node initially
* return the XML 1.0
- * normalized value. However, if the parameters "
- * validate-if-schema" and "
- * datatype-normalization" are set to true
, depending on the attribute normalization
+ * normalized value. However, if the parameters
+ * "validate-if-schema" and
+ * "datatype-normalization"
+ * are set to true
, 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 "
- * datatype-normalization" is set to false
, the XML 1.0 attribute normalization is
+ * 1.0 attribute normalization. If the parameters
+ * "datatype-normalization"
+ * is set to false
, the XML 1.0 attribute normalization is
* guaranteed to occur, and if the attributes list does not contain
* namespace declarations, the attributes
attribute on
- * Element
node represents the property [attributes] defined in [XML Information Set]
- * .
+ * Element
node represents the property [attributes] defined in
+ * [XML Information Set].
* Asynchronous LSParser
objects are expected to also
@@ -102,17 +105,18 @@
*
Note: All events defined in this specification use the
* namespace URI "http://www.w3.org/2002/DOMLS"
.
*
While parsing an input source, errors are reported to the application
- * through the error handler (LSParser.domConfig
's "
- * error-handler" parameter). This specification does in no way try to define all possible
+ * through the error handler (LSParser.domConfig
's
+ * "error-handler"
+ * 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 (DOMError.type
) of
* errors and warnings defined by this specification are:
*
"check-character-normalization-failure" [error]
"doctype-not-allowed" [fatal]
false
and the following XML file is parsed:
+ * this warning will be raised is if the configuration parameter
+ * "entities"
+ * is set to false
and the following XML file is parsed:
* * <!DOCTYPE root [ <!ENTITY e SYSTEM 'subdir/myentity.ent' ]> * <root> &e; </root>@@ -139,9 +144,9 @@ *
"unbound-prefix-in-entity" [warning]
true
and an unbound namespace prefix is
+ * implementation dependent warning that may be raised if the configuration parameter
+ * "namespaces"
+ * is set to true
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. See also the Document Object Model (DOM) Level 3 Load -and Save Specification. + *
See also the
+ * Document Object Model (DOM) Level 3 Load and Save Specification.
*
* @since 1.5
*/
@@ -180,8 +185,10 @@
* needed parameter values from this DOMConfiguration
* object to the DOMConfiguration
object referenced by the
* Document
object.
- *
In addition to the parameters recognized in on the
- * DOMConfiguration interface defined in [DOM Level 3 Core]
+ *
In addition to the parameters recognized in on the
+ * DOMConfiguration
+ * interface defined in
+ * [DOM Level 3 Core]
* , the DOMConfiguration
objects for LSParser
* add or modify the following parameters:
*
true
true
false
true
false
"infoset"
true
false
true
* false
DOMConfiguration
parameters have been applied. For
- * example, if "
- * validate" is set to true
, the validation is done before invoking the
+ * example, if "validate"
+ * is set to true
, the validation is done before invoking the
* filter.
*/
public LSParserFilter getFilter();
@@ -306,8 +320,8 @@
* terminate the parsing early.
* DOMConfiguration
parameters have been applied. For
- * example, if "
- * validate" is set to true
, the validation is done before invoking the
+ * example, if "validate"
+ * is set to true
, the validation is done before invoking the
* filter.
*/
public void setFilter(LSParserFilter filter);
@@ -340,15 +354,18 @@
* @exception LSException
* PARSE_ERR: Raised if the LSParser
was unable to load
* the XML document. DOM applications should attach a
- * DOMErrorHandler
using the parameter "
- * error-handler" if they wish to get details on the error.
+ * DOMErrorHandler
using the parameter
+ * "error-handler"
+ * 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 [IETF RFC 2396]. If the URI
- * contains a fragment identifier (see section 4.1 in [IETF RFC 2396]), the
+ * Parse an XML document from a location identified by a URI reference
+ * [IETF RFC 2396]. If the URI
+ * contains a fragment identifier (see section 4.1 in
+ * [IETF RFC 2396]), 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 LSParser
was unable to load
* the XML document. DOM applications should attach a
- * DOMErrorHandler
using the parameter "
- * error-handler" if they wish to get details on the error.
+ * DOMErrorHandler
using the parameter
+ * "error-handler"
+ * if they wish to get details on the error.
*/
public Document parseURI(String uri)
throws DOMException, LSException;
@@ -431,14 +449,17 @@
* LSParser
is asynchronous (LSParser.async
is
* true
).
* ErrorHandler
instance associated with the "
- * error-handler" parameter of the DOMConfiguration
.
+ * the ErrorHandler
instance associated with the
+ * "error-handler"
+ * parameter of the DOMConfiguration
.
* parseWithContext
, the values of the
* following configuration parameters will be ignored and their default
- * values will always be used instead: "
- * validate", "
- * validate-if-schema", and "
- * element-content-whitespace". Other parameters will be treated normally, and the parser is expected
+ * values will always be used instead:
+ * "validate",
+ * "validate-if-schema",
+ * and
+ * "element-content-whitespace".
+ * Other parameters will be treated normally, and the parser is expected
* to call the LSParserFilter
just as if a whole document
* was parsed.
* @param input The LSInput
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
- * Node.insertBefore
or Node.replaceChild
in [DOM Level 3 Core]
+ * Node.insertBefore
or Node.replaceChild
in
+ * [DOM Level 3 Core]
* ).
* LSParser
doesn't
* support this method, or if the context node is of type
@@ -479,8 +501,9 @@
* @exception LSException
* PARSE_ERR: Raised if the LSParser
was unable to load
* the XML fragment. DOM applications should attach a
- * DOMErrorHandler
using the parameter "
- * error-handler" if they wish to get details on the error.
+ * DOMErrorHandler
using the parameter
+ * "error-handler"
+ * if they wish to get details on the error.
*/
public Node parseWithContext(LSInput input,
Node contextArg,
diff -r e9ad230ea455 -r 18d487a1f933 src/java.xml/share/classes/org/w3c/dom/ls/LSParserFilter.java
--- 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 @@
* Document
, DocumentType
, Notation
,
* Entity
, and Attr
nodes are never passed to the
* acceptNode
method on the filter. The child nodes of an
- * EntityReference
node are passed to the filter if the
- * parameter "
- * entities" is set to false
. Note that, as described by the parameter "
- * entities", unexpanded entity reference nodes are never discarded and are always
+ * EntityReference
node are passed to the filter if the parameter
+ * "entities"
+ * is set to false
. Note that, as described by the parameter
+ * "entities",
+ * unexpanded entity reference nodes are never discarded and are always
* passed to the filter.
* 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. *
DOM applications must not raise exceptions in a filter. The effect of * throwing exceptions from a filter is DOM implementation dependent. - *
See also the Document Object Model (DOM) Level 3 Load -and Save Specification. + *
See also the
+Document Object Model (DOM) Level 3 Load and Save Specification.
*
* @since 1.5
*/
@@ -195,8 +196,8 @@
* SHOW_NOTATION
, SHOW_ENTITY
, and
* SHOW_DOCUMENT_FRAGMENT
are meaningless here. Those nodes
* will never be passed to LSParserFilter.acceptNode
.
- *
The constants used here are defined in [DOM Level 2 Traversal and Range]
- * .
+ *
The constants used here are defined in
+ * [DOM Level 2 Traversal and Range].
*/
public int getWhatToShow();
diff -r e9ad230ea455 -r 18d487a1f933 src/java.xml/share/classes/org/w3c/dom/ls/LSSerializer.java
--- 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 Document
object and its
* children are never altered by the serialization operation.
- *
During serialization of XML data, namespace fixup is done as defined in [DOM Level 3 Core] + *
During serialization of XML data, namespace fixup is done as defined in
+ * [DOM Level 3 Core]
* , Appendix B. [DOM Level 2 Core]
* allows empty strings as a real namespace URI. If the
* namespaceURI
of a Node
is empty string, the
@@ -80,12 +81,14 @@
* namespace fixup is done. The resulting output will be valid as an
* external entity.
*
- *
true
, EntityReference
nodes are
+ * true
, EntityReference
nodes are
* serialized as an entity reference of the form "
* &entityName;
" in the output. Child nodes (the expansion)
- * of the entity reference are ignored. If the parameter "
- * entities" is set to false
, only the children of the entity reference
+ * of the entity reference are ignored. If the parameter
+ * "entities"
+ * is set to false
, only the children of the entity reference
* are serialized. EntityReference
nodes with no children (no
* corresponding Entity
node or the corresponding
* Entity
nodes have no children) are always serialized.
@@ -93,15 +96,16 @@
* CDATAsections
containing content characters that cannot be
* represented in the specified output encoding are handled according to the
- * "
- * split-cdata-sections" parameter. If the parameter is set to true
,
+ * "split-cdata-sections"
+ * parameter. If the parameter is set to true
,
* CDATAsections
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 false
, unrepresentable characters in a
* CDATAsection
are reported as
- * "wf-invalid-character"
errors if the parameter "
- * well-formed" is set to true
. The error is not recoverable - there is no
+ * "wf-invalid-character"
errors if the parameter
+ * "well-formed"
+ * is set to true
. The error is not recoverable - there is no
* mechanism for supplying alternative characters and continuing with the
* serialization.
* DOMError
fatal error. An example would be serializing
* the element <LaCañada/> with encoding="us-ascii"
.
* This will result with a generation of a DOMError
- * "wf-invalid-character-in-node-name" (as proposed in "
- * well-formed").
- * When requested by setting the parameter "
- * normalize-characters" on LSSerializer
to true, character normalization is
- * performed according to the definition of fully
- * normalized characters included in appendix E of [XML 1.1] on all
+ * "wf-invalid-character-in-node-name" (as proposed in
+ * "well-formed").
+ *
When requested by setting the parameter
+ * "normalize-characters"
+ * on LSSerializer
to true, character normalization is
+ * performed according to the definition of
+ * fully
+ * normalized characters included in appendix E of
+ * [XML 1.1] 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 [DOM Level 3 Core]
+ * "Namespace normalization", of
+ * [DOM Level 3 Core]
* .
*
While serializing a document, the parameter "discard-default-content" * controls whether or not non-specified data is serialized. *
While serializing, errors and warnings are reported to the application
- * through the error handler (LSSerializer.domConfig
's "
- * error-handler" parameter). This specification does in no way try to define all possible
+ * through the error handler (LSSerializer.domConfig
's
+ * "error-handler"
+ * 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 (
* DOMError.type
) of errors and warnings defined by this
@@ -189,8 +198,9 @@
*
"unbound-prefix-in-entity-reference" [fatal]
true
and an entity whose replacement text
+ * configuration parameter
+ * "namespaces"
+ * is set to true
and an entity whose replacement text
* contains unbound namespace prefixes is referenced in a location where
* there are no bindings for the namespace prefixes. See also the Document Object Model (DOM) Level 3 Load -and Save Specification. + *
See also the
+ *
+Document Object Model (DOM) Level 3 Load and Save Specification.
*
* @since 1.5
*/
@@ -211,8 +222,10 @@
/**
* The DOMConfiguration
object used by the
* LSSerializer
when serializing a DOM node.
- *
In addition to the parameters recognized by the
- * DOMConfiguration interface defined in [DOM Level 3 Core]
+ *
In addition to the parameters recognized by the
+ * DOMConfiguration
+ * interface defined in
+ * [DOM Level 3 Core]
* , the DOMConfiguration
objects for
* LSSerializer
adds, or modifies, the following
* parameters:
@@ -221,9 +234,11 @@
*
true
true
will set the parameters
* "format-pretty-print", "discard-default-content", and "xml-declaration
* ", to false
. Setting one of those parameters to
@@ -267,7 +282,8 @@
* true
"unknown-character-denormalization"
warning (instead of
@@ -281,18 +297,21 @@
* "normalize-characters"
DOMConfiguration
in [DOM Level 3 Core]
+ * the one defined by DOMConfiguration
in
+ * [DOM Level 3 Core]
* . Unlike in the Core, the default value for this parameter is
* true
. While DOM implementations are not required to
* support fully
- * normalizing the characters in the document according to appendix E of [XML 1.1], this
+ * normalizing the characters in the document according to appendix E of
+ * [XML 1.1], this
* parameter must be activated by default if supported. "xml-declaration"
true
Document
, Element
, or Entity
+ * Document
,
+ * Element
, or Entity
* node is serialized, the XML declaration, or text declaration, should
* be included. The version (Document.xmlVersion
if the
* document is a Level 3 document and the version is non-null, otherwise
@@ -303,7 +322,8 @@
* false
* "xml-declaration-needed"
warning if this will cause
- * problems (i.e. the serialized data is of an XML version other than [XML 1.0], or an
+ * problems (i.e. the serialized data is of an XML version other than
+ * [XML 1.0], or an
* encoding would be needed to be able to re-parse the serialized data). DOMConfiguration
parameters have been applied. For
- * example, CDATA sections won't be passed to the filter if "
- * cdata-sections" is set to false
.
+ * example, CDATA sections won't be passed to the filter if
+ * "cdata-sections"
+ * is set to false
.
*/
public LSSerializerFilter getFilter();
/**
@@ -371,8 +392,9 @@
* serialization early.
* DOMConfiguration
parameters have been applied. For
- * example, CDATA sections won't be passed to the filter if "
- * cdata-sections" is set to false
.
+ * example, CDATA sections won't be passed to the filter if
+ * "cdata-sections"
+ * is set to false
.
*/
public void setFilter(LSSerializerFilter filter);
@@ -414,8 +436,9 @@
* @exception LSException
* SERIALIZE_ERR: Raised if the LSSerializer
was unable to
* serialize the node. DOM applications should attach a
- * DOMErrorHandler
using the parameter "
- * error-handler" if they wish to get details on the error.
+ * DOMErrorHandler
using the parameter
+ * "error-handler"
+ * 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 LSSerializer
was unable to
* serialize the node. DOM applications should attach a
- * DOMErrorHandler
using the parameter "
- * error-handler" if they wish to get details on the error.
+ * DOMErrorHandler
using the parameter
+ * "error-handler"
+ * 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 LSSerializer
was unable to
* serialize the node. DOM applications should attach a
- * DOMErrorHandler
using the parameter "
- * error-handler" if they wish to get details on the error.
+ * DOMErrorHandler
using the parameter
+ * "error-handler"
+ * if they wish to get details on the error.
*/
public String writeToString(Node nodeArg)
throws DOMException, LSException;