Hitachi

uCosminexus Application Server XML Processor User Guide


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‒25: Notes on the org.w3c.dom.ls package

No.

Notes

1

You 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.

2

Table 6-26 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-23 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.

3

If you specify any value for the charset-overrides-xml-encoding parameter of the LSParser object, the value is ignored.

4

The parseWithContext method for the LSParser interface is not supported.

5

The setNewLine method of the LSParser object is not supported.

6

The LSParser object cannot analyze the XML1.1 document.

7

The startElement method of the LSParser object is not called for the root element.

8

If 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.

9

Table 6-27 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-23 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.

10

If 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.

11

The write, writeToString, and writeToURI methods of the LSSerialize object cannot serialize the nodes whose namespaces are disabled.

12

The default value for the end-of-line sequence character obtained from the getNewLine method of the LSSerializer interface is \n.

13

If the processing instruction in the ProcessingInstruction object includes the character string ?>, no error notification is provided if the ProcessingInstruction object is serialized.

14

When 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‒26: Parameters that can be set for DOMConfiguration objects (LSParser objects)

Parameter name

Valid values

charset-overrides-xml-encoding

true, false

disallow-doctype

false

ignore-unknown-character-denormalizations

true

supported-media-types-only

false

Table 6‒27: Parameters that can be set for DOMConfiguration objects (LSSerializer objects)

Parameter name

Valid values

discard-default-content

true, false

format-pretty-print

false

ignore-unknown-character-denormalizations

true

xml-declaration

true, false