# JavaTM Architecture for XML Binding
CHANGELOG

Specification Version: 1.0
Reference Implementation (RI) Version: 1.0.6

Main: Release Notes | XJC | Ant task | Sample Apps | Changelog
JAXB RI Extensions: Runtime Properties | XJC Customizations
JAXB RI Schema Languages: W3C XML Schema | RELAX NG | DTD
JAXB Community: Java.net Homepage | Developer interest list | FAQ

## Changes between 1.0.4 FCS and 1.0.5 FCS

The following list summarizes significant changes made to the JAXB Reference Implementation since the JAXB version 1.0.4 FCS release.

- Bug Fixes
  - IssueTracker:
    - 36 - com.sun.xml.bind.util.ListImpl does not implement equals method correctly
    - 44 - Defect in DTD binding information file (bindingfile.nrg)
    - 50 - Generated time in the header of java files created by xjc does not indicate afternoon times
  - fixed bug 6209582: The method _$$init$$1() of ObjectFactory is too big for VM ( > 65535bytes)
  - fixed bug 6261158: XJC displays @@BUILD_VERSION@@ instead of version string
  - fixed a comparison problem reported by Aleksei
  - added code to handle broken DOM's and SAX parser implementations more gracefully
  - fixed an NPE in the XJC Ant task
  - implemented Anand Vallamshettla's suggestion of doing the state transition before processing the value for more graceful error recovery
  - modified the xjc shell scripts to set the java.endorsed.dirs so that it runs on JRE 1.4.

## Changes between 1.0.3 FCS and 1.0.4 FCS

The following list summarizes significant changes made to the JAXB Reference Implementation since the JAXB version 1.0.3 FCS release.

- Bug Fixes
  - IssueTracker:
    - 15 - can't parse W3 SOAP 2003-05 envelope XML schema: "xml:lang"
    - 18 - Performance Improvement in NamespaceContextImpl.java
    - 19 - Performance Improvement in NamespaceContextImpl.java
    - 24 - XJC doesn't work with directories with spaces in them
    - 28 - ValidatorImpl does not initialize DatatypeConverter
  - fixed an NPE that affected Acord and UBL 1.0 schemas
  - found and fixed a StackOverflowError in XJC
  - xjc handles non-existant ouput directories more gracefully
  - found and removed some dependencies on jdk1.4
  - fixed a bug in the entity resolver handling
- Other
  - updated UBL sample app to UBL 1.0 schema (Visit the UBL interest page for more information).

## Changes between 1.0.2 FCS and 1.0.3 FCS

The following list summarizes significant changes made to the JAXB Reference Implementation since the JAXB version 1.0.2 FCS release.

- Bug Fixes
  - Improved command line error handling
  - Fixed bug where JAXB crashed when using JAXBResult
  - Improved line number reporting for DTD compilation messages
  - Improved naming collision error messages
  - Improved DTD wildcard handling
  - Improved error reporting when <javaType> contains an undefined simple type
  - Fixed a couple of bugs related to XJC error handling with external binding files
  - Fixed a bug that was causing an exception when Unmarshalling an element with int list as value
  - Fixed a bug related to the compilation of multiple schemas that import a common base schema
- Performance Enhancements
  - Fixed a memory leak in XSOM
  - Modified XJC to use less call stack to avoid StackOverflowErrors
  - Generated ObjectFactory classes now specify an initialCapaicty on their defaultImpl HashMaps. This should obviate the need to rehash at runtime for very large schemas.
  - Improved memory usage in XJC
  - Force string interning during unmarshalling to improve runtime performance
  - Reuse AttributesImpl object rather than reallocate
  - Lazily instantiate ListImpl classes in the generated code to save on memory usage
- Other
  - Added a new JAXB RI vendor customization that allows for partial-code generation (reduced functionality bindings)
  - Began posting weekly binary and source bundles to java.net
  - Added a -quiet option on the XJC command line to supress verbose output

## Changes between 1.0.1 FCS and 1.0.2 FCS

The following list summarizes significant changes made to the JAXB Reference Implementation since the JAXB version 1.0.1 FCS release.

- Additional schema support (available only in "extension mode")
  - JAXB now supports `xsi:type` (XSD type substitution).
  - JAXB now supports `block, abstract, final, blockDefault, and finalDefault` attributes for the `<complexType>, <element>, and <schema>` elements.
- Enhancements
  - `XJCTask` no longer fails if the directory specified by an enclosed `<produces>` doesn't exist.
  - Marshaller error messages have been revised to be more informative.
  - The marshaller now supports marshalling of `QName`s.
  - `xjc:superClass` now supported for DTD.
  - `javaType` customization now supported for RELAX NG.
  - A new vendor extension suppresses `<?xml?>.`
  - A new vendor extension allows you to set `<!DOCTYPE>`
  - `NamespacePrefixMapper` now allows namespaces to be declared within greater scope.
  - `xjc` is now more tolerant of different XML parser implementations.
  - Ad hoc performance enhancements
  - <xs:documentation>s are now also picked up for javadoc comments for classes
- Bug fixes
  - `xjc` now rejects a `javaType` customization not enclosed by a `property` tag.
  - `xjc` now emits a warning when compiling a schema with no global element declaration.
  - The `propagateEvent` method in `ErrorHandlerAdaptor` now passes the right boolean to `handleEvent`.
  - A condition where a schema wouldn't validate even after being revised to be valid has been fixed.
  - `xjc` now handles highly cyclic complex types better.
  - `xjc` now provides an application specific error in a case where it had been throwing an `InternalError`.
  - `JAXBException.printStackTrace(PrintWriter)` now works.
  - `xjc` now generates javadoc for `xsd:attribute@use` and `xsd:attribute@default`.
  - `xjc` now honors vendor extensions in an external binding file.
  - `xjc` now processes `javadoc` customizations within a `property`.
  - A condition where `xjc` wasn't resolving a reference to a type in an included fragment has been fixed.
  - A condition where the runtime would marshal an attribute with an empty namespace prefix has been fixed.
  - A condition where the runtime wouldn't validate an instance with a derived attribute has been fixed.
  - JAXB now handles the time zone offset properly.
  - Validation no longer fails when an `xsd:choice` has attributes defined by an `xsd:element` type.

## Changes between 1.0 FCS and 1.0.1 FCS

The following list summarizes significant changes made to the JAXB Reference Implementation since the JAXB version 1.0 FCS release.

1. JAR file changes & additions:

   > `$JWSDP_HOME/jaxb/libs/jaxb-ri.jar` | Renamed `$JWSDP_HOME/jaxb/libs/jaxb-impl.jar`
   > `$JWSDP_HOME/jwsdp-shared/lib/relaxngDatatype.jar` | New JAR file*
   > `$JWSDP_HOME/jwsdp-shared/lib/xsdlib.jar` | New JAR file*
   > * The contents of the `relaxngDatatype.jar` and `xsdlib.jar` files used to be contained within the `$JWSDP_HOME/jaxb/libs/jaxb-libs.jar` file, but were broken out so they could be shared with other Java WSDP component technologies.

2. There are several new compiler switches. Please read about them in the xjc notes.
3. Many of the JAXB runtime classes that used to be contained in the `jaxb-ri.jar` file are now generated by the binding compiler as part of the client package. You can find these classes under one of the generated packages. In the following example, the new generated runtime classes are contained in `primer.po.impl.runtime`:

            parsing a schema...
            compiling a schema...
            primer\po\impl\CommentImpl.java
            primer\po\impl\ItemsImpl.java
            primer\po\impl\JAXBVersion.java
            primer\po\impl\PurchaseOrderImpl.java
            primer\po\impl\PurchaseOrderTypeImpl.java
            primer\po\impl\USAddressImpl.java
            primer\po\impl\runtime\Discarder.java
            primer\po\impl\runtime\AbstractUnmarshallingEventHandlerImpl.java
            primer\po\impl\runtime\XMLSerializable.java
            primer\po\impl\runtime\AbstractGrammarInfoImpl.java
            primer\po\impl\runtime\MarshallerImpl.java
            primer\po\impl\runtime\ContentHandlerAdaptor.java
            primer\po\impl\runtime\ValidatableObject.java
            primer\po\impl\runtime\DefaultJAXBContextImpl.java
            primer\po\impl\runtime\ErrorHandlerAdaptor.java
            primer\po\impl\runtime\ValidatingUnmarshaller.java
            primer\po\impl\runtime\GrammarInfoFacade.java
            primer\po\impl\runtime\XMLSerializer.java
            primer\po\impl\runtime\ValidationContext.java
            primer\po\impl\runtime\Util.java
            primer\po\impl\runtime\UnmarshallingEventHandler.java
            primer\po\impl\runtime\UnmarshallingContext.java
            primer\po\impl\runtime\UnmarshallableObject.java
            primer\po\impl\runtime\NamespaceContext2.java
            primer\po\impl\runtime\NamespaceContextImpl.java
            primer\po\impl\runtime\MSVValidator.java
            primer\po\impl\runtime\ValidatorImpl.java
            primer\po\impl\runtime\UnmarshallingEventHandlerAdaptor.java
            primer\po\impl\runtime\SAXMarshaller.java
            primer\po\impl\runtime\UnmarshallerImpl.java
            primer\po\impl\runtime\SAXUnmarshallerHandlerImpl.java
            primer\po\impl\runtime\GrammarInfo.java
            primer\po\impl\runtime\PrefixCallback.java
            primer\po\impl\runtime\SAXUnmarshallerHandler.java
            primer\po\Comment.java
            primer\po\Items.java
            primer\po\ObjectFactory.java
            primer\po\PurchaseOrder.java
            primer\po\PurchaseOrderType.java
            primer\po\USAddress.java
            primer\po\bgm.ser
            primer\po\jaxb.properties

   If you are compiling multiple schemas and would like to share the generated runtime classes across all of the packages, use the "`-use-runtime`" compiler switch.

4. The JAXB RI has added vendor-specific properties that allow you to control the behavior of some of the runtime classes. See the JAXB Vendor Extension documentation for additional information.
5. Additional features supported (element substitution, DOM customization, enhanced pretty printing, better I18N support).
6. The `$JWSDP_HOME/jaxb/examples` directory was renamed `$JWSDP_HOME/jaxb/samples` to follow the same directory naming conventions as the other Java WSDP component technologies. Also, all of the `SampleApp#` directories were give more descriptive names - see the Sample Apps page for more information.
7. Improved XJC Ant Task support.
8. `javax.xml.namespace.QName` has been updated. See the QName javadocs

## Changes between 1.0 Beta and 1.0 FCS

The following list summarizes significant changes made to the JAXB Reference Implementation since the beta release.

1. Factory methods in schema-derived `ObjectFactory` classes were static in Beta and are now instance methods in JAXB v1.0.

   Class `ObjectFactory` is specified in section 4.2 of JAXB v1.0 specification. The rationale for this change was to enable associating implementation specific property/value pairs with object creation.

   Illustration of change:

   Object Factory Creation fragment in Beta:

           Comment comment = ObjectFactory.createComment("foo");

   Object Factory Creation in FCS:

           ObjectFactory of = new ObjectFactory();
           Comment comment = of.createComment("foo");

2. A JAXB property representing an XML Schema element reference was not bound to Java accessor methods as specified. The basetype of the JAXB property was the referenced element's Java element interface in the Beta release, when it should have been the Java type representing the XML element's datatype. The rationale for this change is that the Java method signatures should not be impacted by whether XML element content is represented as a local element declaration or an element reference.

   This change manifests itself as a compilation error when a JAXB property should be passing in an instance of a builtin Java datatype, the XML element's type, rather than its element instance. All global element's with XML complex types are not impacted by this change, only references to global elements where the XML global element's type is an XML Schema builtin datatype that is bound to a Java builtin type require any change.

   Illustration of change:

   For example, given schema fragments:

          <xs:complexType name="AComplexType"/>
          <xs:element name="GlobalElement" type="AComplexType"/>
          <xs:element name="Comment" type="xs:string"/>
          <xs:complexType name="refCommentExample">
             <xs:sequence>
                <xs:element ref="Comment"/>
                <xs:element ref="GlobalElement"/>
             </xs:sequence>
           </xs:complexType>

   Beta generated accessors for JAXB properties, `Comment` and `GlobalElement`, with the base type corresponding to the Java element interface, not the Java datatype for the XML element's type.

   The following methods were generated with the Beta version:

       interface AClass {
         Comment getComment();
         void setComment(Comment value);
         GlobalElement getGlobalElement();
         void setGlobalElement(GlobalElement value);
       }

   The following methods were generated with the FCS version:

       interface AClass {
         String getComment();
         void setComment(String value);
         AComplexType getGlobalElement();
         // Parameter "value" can be an instance of an XML element's type Or
         // an instance of an XML element's interface.
         // Thus, one can pass an instanceof GlobalElement interface OR an
         // instance of AComplexType to setGlobalElement.
         void setGlobalElement(AComplexType value);
       }

3. The Customization: javaType `printMethod` and `parseMethod` attributes are required to be specified more frequently in the FCS release than they had to be in the Beta release. This specification change was the result of not being able to properly handle all the defaulting cases in the Beta release. See Section 6.9 "<javaType> Declaration" in JAXB v1.0 Specification for more details.
4. Additional APIs:
   - `getProperty()` / `setProperty()` added to `javax.xml.bind.Unmarshaller`
   - `getProperty()` / `setProperty()` added to `javax.xml.bind.Validator`
   - `getProperty()` / `setProperty()` added to all of the generated `ObjectFactory` classes
   - `getNode()` added to `javax.xml.bind.Marshaller`

$Revision: 1.1 $
$Date: 2008/11/03 06:51:11 $