http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Installation
Download
CVS Repository

Samples
API JavaDoc
FAQs

Features
Properties

XNI Manual
XML Schema
DOM
Limitations

Release Info
Report a Bug

Disclaimer
 

The Xerces2 Java Parser 2.2.1 contains a partial implementation of the W3C Document Object Model Level 3.

The DOM Level 3 specification is at the stage of Working Draft, which represents work in progress and thus may be updated, replaced, or obsoleted by other documents at any time. This implementation is experimental: it should not be considered as complete or correct.


Introduction
 

The Xerces2 Java Parser 2.2.1 contains an implementation of a subset of the W3C DOM Level 3 as specified in Core, Load and Save, and Abstract Schemas [deprecated].

The DOM Level 3 methods for which implementation is not provide will throw DOMException NOT_SUPPORTED_ERR exception.

Note:To find out how to access DOM Level 3 functionality, please refer to the FAQ.

Implementation of DOM Level 3 Core
 

Most of the DOM Level 3 functionality is implemented, including:

  • DOMBuilder filter -- if an application provides a filter, the parser will call this filter at the completion of the construction of each Element node.
  • DOMWriter filter -- if an application provides a filter, the serializer will call this filter before serializing each Node.
  • Document normalizeDocument -- this method normalizes Text nodes, makes the document "namespace wellformed" by adding missing namespace declaration attributes and adding or changing namespace prefixes, updates the replacement tree of EntityReference nodes, normalizes attribute values, etc. The actual result depends on the features being set and governing what operations actually take place. The methods setNormalizationFeature, getNormalizationFeature, canSetNormalizationFeature are also supported.
  • Node compareTreePosition -- compares a node with this node with regard to their position in the tree and according to the document order.
  • Node lookupNamespaceURI, lookupNamespacePrefix, isDefaultNamespace -- performs different namespace URI/prefix lookups.
  • DOMError, DOMErrorHandler, DOMLocator, UserDataHandler -- users can register error and user data handlers.

The normalization features supported are:

  • canonical-form [false]
  • cdata-sections [true/false]
  • comments [true/false]
  • entities [true/false]
  • infoset [false]
  • namespace-declarations [true]
  • normalize-characters [false]
  • split-cdata-sections [true/false]
  • validate-if-schema [false]
  • whitespace-in-element-content [true]
  • datatype-normalization [true/false] -- the XML Schema normalized values will not be exposed via the DOM even if the value of this feature is set to true (to be implemented).
  • discard-default-content [true/false] -- the removal of default content depends on isSpecified flag.
  • validate [true/false] -- revalidation is supported only against XML Schemas. For more information, please refer to How to revalidate DOM in memory?.

Implementation of DOM Level 3 Load and Save
 

Most of the functionality is implemented. Here is the list of limitations:

  • DOMBuilder parserWithContext
  • DOMImplementationLS MODE_ASYNCHRONOUS -- not supported.
  • DOMImplementationLS createDOMBuilder -- if schemaType has value of "http://www.w3.org/2001/XMLSchema" the parser created will attempt to validate against DTD if one is found. If DTD is not found the parser will validate against XML Schemas.

Implementation of DOM Level 3 Abstract Schemas
 

The implementation of Abstract Schemas is deprecated. The funtionality will be removed in the future releases of Xerces.

  • DOMImplementationAS
  • DOMASBuilder supports parsing of XML Schemas and setting the ASModel on the parser.
Note: DOMASBuilder does not support parsing of DTDs. The parser provides only partial implementation for ASModel. For more information on how to parse schemas and set those on the parser instance, see dom.ASBuilder sample.


Copyright © 1999-2002 The Apache Software Foundation. All Rights Reserved.