JavaTM API for XML Processing Release Notes

Specification Version: 1.4
Reference Implementation (RI) Version: 1.4.0

This document contains installation instructions and other notes that may help you use this software library more effectively. See also the JAXP FAQ for more information.

Note:
If you are reading this page online, this is the most current version of the release notes. If this page was downloaded as part of the release bundle, please see the JAXP Documentation page for the most current version of the release notes.

Contents

Feature Changes

An important technical change in JAXP 1.4 is the addition of the javax.xml.stream.* packages from StAX, the Streaming API for XML (JSR 173). With this addition, JAXP 1.4 now supports validation and transformation of documents with the streaming API. Since JAXP 1.4 is integrated in Java SE 6, the StAX support is transparent on any system running the latest Java.

gMonth

JAXP 1.4 changed its XML Schema validation logic for gMonth to reflect the changes made in the XML Schema 1.0 Specification Errata: E2-12 Error. Specifically, it will now reject gMonths with a lexical representation of "--MM--" as invalid.

JAXP Specification Changes since 1.3

Refer also to JAXP 1.4 Specification Chapter 9. Changes Since JAXP 1.3.

The following sections summarize the significant changes introduced in JAXP 1.4. For additional details, please see the appropriate JavaDoc.

1. Package javax.xml.datatype

1.1. Class DatatypeFactory

  • Changed DATATYPEFACTORY_IMPLEMENTATION_CLASS to com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl.

  • Added newInstance(String, ClassLoader) method.

1.2. Class Duration

  • Return false if the argument to equals() is null instead of throwing NullPointerException.

1.3. Class XMLGregorianCalendar

  • Return false if the argument to equals() is null instead of throwing NullPointerException.

2. Package javax.xml.parsers

2.1. Class DocumentBuilderFactory

  • Added newInstance(String, ClassLoader) method.

2.2. Class SAXParserFactory

  • Added newInstance(String, ClassLoader) method.

3. Package javax.xml.stream

      Added the javax.xml.stream package to support StAX. The package consists of the following interfaces:

  • EventFilter

  • Location

  • StreamFilter

  • XMLEventReader

  • XMLEventWriter

  • XMLReporter

  • XMLResolver

  • XMLStreamConstants

  • XMLStreamReader

  • XMLStreamWriter

      Classes:

  • XMLEventFactory

  • XMLInputFactory

  • XMLOutputFactory

      Exceptions:

  • XMLStreamException

      And errors:

  • FactoryConfigurationError

4. Package javax.xml.stream.events

      Added the javax.xml.stream.events package to support StAX. The package consists of the following interfaces:

  • Attribute

  • Characters

  • Comment

  • DTD

  • EndDocument

  • EndElement

  • EntityDeclaration

  • EntityReference

  • Namespace

  • NotationDeclaration

  • ProcessingInstruction

  • StartDocument

  • StartElement

  • XMLEvent

4.1. Package javax.xml.stream.util

      Added the javax.xml.stream.util package to support StAX. The package consists of the following interfaces:

  • XMLEventAllocator

  • XMLEventConsumer

      And classes:

  • EventReaderDelegate

  • StreamReaderDelegate

5. Package javax.xml.transform

5.1. Class ErrorListener

  • Clarified the semantics of fatalError().

5.2. Class Transformer

  • Clarified the semantics of getOutputProperty() with respect to properties that have not been set explicitly with either setOutputProperty() or xsl:output in the stylesheet.

5.3. Class TransformerFactory

  • Added newInstance(String, ClassLoader) method.

5.4. Package javax.xml.transform.stax

      Added the javax.xml.transform.stax package to support StAX. The package consists of the following interfaces:

  • TemplatesHandler

  • TransformerHandler

      And classes:

  • StAXResult

  • StAXSource

6. Package javax.xml.validation

6.1. Class Schema

  • Clarified that the features set on the SchemaFactory should be passed to the Validator created with newValidator().

  • Clarified that the features set on the SchemaFactory should be passed to the ValidatorHandler created with newValidatorHandler().

6.2. Class SchemaFactory

  • Added newInstance(String, ClassLoader) method.

  • Clarified that the features set on the SchemaFactory should be passed to the Schemas created with newSchema(). Included a note to implementors and developers about the subtleties associated with newSchema() in this context.

  • Clarified that the inputs to newSchema(Source[]) are expected to be XML documents or elements.

  • Updated documentation of setFeature() to clarify that the features set on the SchemaFactory should be passed to the Schemas created with this factory and by extension to the Validator and ValidatorHandlers created from that Schema.

6.3. Class SchemaFactoryLoader

The SchemaFactoryLoader class was created during the JAXP 1.3 development process. Shortly before JAXP 1.3 was finished, the factory mechanisms associated with validation were changed, and this class was removed. Unfortunately, the file was left in a repository and it slipped into the Java 2 Platform Standard Edition 5.0 API Specification.

Since the class can neither be added to JAXP 1.3 nor removed from the Java 5.0 API Specification due to backwards compatibility issues, it is being added to JAXP 1.4. The class is harmless and should not be used. It is being added simply to avoid the confusion that arises when developers notice that it's defined in the platform but not in JAXP.

Do not use this class.

6.4. Class TypeInfoProvider

  • Extended the semantics of getElementTypeInfo(), allowing it to be called from either the startElement event or the endElement event. This allows the API to support W3C XML Schema union types more usefully.

    When W3C XML Schema validation is being performed, in the case where an element has a union type, the TypeInfo returned by a call to getElementTypeInfo() from the startElement event will be the union type. The TypeInfo returned by a call from the endElement event will be the actual member type used to validate the element.

6.5. Class Validator

  • The Validator may now accept Sources other than DOMSource and SAXSource; for example, StAXSource.

  • Clarified that the inputs to validate() are expected to be XML documents or elements.

7. Package javax.xml.xpath

7.1. Class XPath

  • Clarified that it is the XPathVariableResolver in effect at compile time that is used to resolve any variables that appear in the expression.

7.2. Class XPathFactory

  • Added newInstance(String, ClassLoader) method.


Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.