Hitachi

uCosminexus Application Server XML Processor User Guide


6.12 Notes on the org.w3c.dom Package

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

Table 6‒22: Notes on the org.w3c.dom package

No.

Notes

1

Table 6-23 lists the parameters that can be set for the DOMConfiguration object. 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.

2

The parameter name for the DOMConfiguration object is not case-sensitive.

3

For the DOM Level 3, new methods are added to the interface for the existing DOM Level 2. For example, the isId method is added to the Attr interface. Usually, no application program implements these interfaces. If the application implements the interfaces, the method implementation added for the DOM Level 3 needs to be added to the application.

4

If you define the default value for an attribute in XMLSchema and delete the Attr node that corresponds to that attribute, the attribute node for which the getSpecified method returns false will not be generated.

5

The normalizeDocument method of the Document object is not supported.

6

The adoptNode method of the Document object is not supported. Instead, use a combination of the importNode method of the Document object and the removeChild method of the Node object.

7

The getInputEncoding method of the Document object and the getInputEncoding method of the Entity object are not supported.

8

When all of the following conditions are met, a DOMException does not occur by executing the renameNode(Node n, String namespaceURI, String qualifiedName) method of the Document object:

  • The n argument is an Attr object that does not support namespace.

  • The namespaceURI argument is null.

  • The qualifiedName argument is an invalid qualified name.

If you specify the Element or Attr object for the n argument and specify null for the qualifiedName argument, a NullPointerException occurs rather than a DOMException.

9

The getBaseURI method of the Attr, Text, EntityReference, CDATASection, DocumentType, and DocumentFragment objects cannot obtain a URI.

10

Apply the replaceWholeText(String) method of the Text object to the DOM tree without a EntityReference node.

11

A return value from the getByteOffset of the DOMLocator object is always -1.

12

An object of the return value when you apply the getRelatedData method to the DOMError argument of the handleError method of the DOMErrorHandler object is not always a Node object. The return value can be the String object indicating an error message.

13

For a Document object acquired by parsing, the DOMException exception might not occur even when the insertBefore method or the appendChild method is used to add an inappropriate node.

14

When all the following conditions are satisfied, the return value of invoking the getSchemaTypeInfo method for an element node is invalid:

  1. Use an XML schema document to define a derived type element using union.

  2. Use the schema document described in condition 1 above to implement verification check parsing.

  3. Acquire the element node corresponding to condition 1 above from the DOM that is created in condition 2, and invoke the getSchemaTypeInfo method.

Table 6‒23: Parameters that can be set for DOMConfiguration objects

Parameter name

Valid values

canonical-form

false

cdata-sections

true, false

check-character-normalization

false

comments

true, false

datatype-normalization

false

element-content-whitespace

true

entities

true, false

error-handler

DOMErrorHandler object

infoset

true, false

namespaces

true

namespace-declarations

true, false

normalize-characters

false

schema-location

Cannot be set.

schema-type

Cannot be set.

split-cdata-sections

true, false

validate

false

validate-if-schema

false

well-formed

true

resource-resolver

LSResourceResolver object