6.14 Notes on the org.w3c.dom.ls Package

The following table gives cautionary notes on the org.w3c.dom.ls package.

Table 6-26 Notes on the org.w3c.dom.ls package

No.Notes
1You can specify only the DOMImplementationLS.MODE_SYNCHRONOUS for the mode argument of the createLSParser(short mode, String schemaType) method on the DOMImplementationLS interface. Also, you can specify null, http://www.w3.org/2001/XMLSchema, or http://www.w3.org/TR/REC-xml for the schemaType argument.
2Table 6-27 lists the parameters that can be set for the DOMConfiguration object that is obtained by applying the getDomConfig method to the LSParser object. In addition to those parameters, the parameters listed in Table 6-24 of 6.12 Notes on the org.w3c.dom Package can also be set. Parameters that can be set do not match the return values from the getParameterNames and canSetParameter methods. Also, if you specify a value that cannot be set, an exception may not occur. If you specify a value that cannot be set, the operation is not guaranteed.
3If you specify any value for the charset-overrides-xml-encoding parameter of the LSParser object, the value is ignored.
4The parseWithContext method for the LSParser interface is not supported.
5The setNewLine method of the LSParser object is not supported.
6The LSParser object cannot analyze the XML1.1 document.
7The startElement method of the LSParser object is not called for the root element.
8If a LSException occurs when you analyze by using the LSParser object or perform serialization by using the LSSerializer object, the return value from the getMessage() method may be null. In such cases, an exception may have occurred in the user implementation class of the LSParserFilter or LSSerializerFilter.
9Table 6-28 lists the parameters that can be set for the DOMConfiguration object that is obtained by applying the getDomConfig method to the LSSerializer object. In addition to those parameters, the parameters listed in Table 6-24 of 6.12 Notes on the org.w3c.dom Package can also be set. Parameters that can be set do not match the return values from the getParameterNames and canSetParameter methods. Also, if you specify a value that cannot be set, an exception may not occur. If you specify a value that cannot be set, the operation is not guaranteed.
10If you specify any node other than the Document, DocumentFragment, and Element nodes for the nodeArg argument of the write, the writeToString, and writeToURI methods for the LSSerialize object, those nodes are not serialized.
11The write, writeToString, and writeToURI methods of the LSSerialize object cannot serialize the nodes whose namespaces are disabled.
12The default value for the end-of-line sequence character obtained from the getNewLine method of the LSSerializer interface is \n.
13If the processing instruction in the ProcessingInstruction object includes the character string ?>, no error notification is provided if the ProcessingInstruction object is serialized.
14When using LSParser to parse, a DOMException exception might not occur even if the contents of the DocumentType object that is acquired from the Document object are changed.

Table 6-27 Parameters that can be set for DOMConfiguration objects (LSParser objects)

Parameter nameValid values
charset-overrides-xml-encoding true, false
disallow-doctypefalse
ignore-unknown-character-denormalizationstrue
supported-media-types-onlyfalse

Table 6-28 Parameters that can be set for DOMConfiguration objects (LSSerializer objects)

Parameter nameValid values
discard-default-contenttrue, false
format-pretty-printfalse
ignore-unknown-character-denormalizationstrue
xml-declarationtrue, false