6.12 Notes on the org.w3c.dom Package
The following table gives cautionary 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:
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:
|
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 |