This section presents the new services and the improvements added to the XSD Tools for Java v2.0 release with regards to the v1.1 release.
- Extended-XER support
The MARBEN™ XSD Tools for Java v2.0 support Extended-XER,
that is the ability to encode and decode XML values conformant to the input XML schema (see amendment 1 to [X.693]).
The v2.0 XSD Compiler generates XER encoding instructions in the ASN.1 output file and the v2.0 XSD Runtime encompasses an Extended-XER encoder/decoder.
This new feature does not modify the Java API with regards to the v1.1 version.
- Double type usable on 32 bits platforms
To allow the double XML schema type to be used on 32 bits platforms, the
(-9007199254740991..9007199254740991) constraint on the mantissa has been removed from the generated ASN.1 file.
This is not strictly conforming to [X.694] but does not cause any compatibility problem with others [X.694] tools.
- DATE_TIME and DURATION mapping
The corrigendum 1 to [X.694] has modified the names of the ASN.1 types corresponding to the dateTime and duration XML schema types.
These names have been changed from DATE-TIME and DURATION to DATE-TIME-Type and DURATION-Type.
This change impacts the ASN.1 output file, and consequently the Java API and the XER encoding (basic and canonical only).
However, this will generally not break the inter-release compatibility because these names are usually only used through other names that have not changed.
- Substitution group mapping
This 2.0 version corrects the mapping of substitution groups on two points.
Firstly, in the v1.1 version, the fields of the CHOICE type mapped for the substitution group were not sorted by named as required by [X.694].
Example:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="root" type="xs:string" block="restriction"/>
<xs:element name="before" substitutionGroup="root" />
</xs:schema>
Part of v1.1 ASN.1 mapping :
Root-group ::= CHOICE { // wrong : fields are not sorted
root Root,
before Before
}
Part of v2.0 ASN.1 mapping :
Root-group ::= CHOICE { // good : fields are sorted
before Before,
root Root
}
Secondly, in the v1.1 version, in some cases, a reference to a head of substitution group was incorrectly mapped.
Example:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element ref="uid"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="uid" type="uidType"/>
<xs:element name="uid2" substitutionGroup="uid" type="uidType"/>
<xs:complexType name="uidType">
<xs:attribute name="val" type="xs:string"/>
</xs:complexType>
</xs:schema>
Part of v1.1 ASN.1 mapping :
Root ::= SEQUENCE {
uid Uid // wrong : head of substitution group
}
Uid-group ::= CHOICE {
uid Uid,
uid2 Uid2
}
Part of v2.0 ASN.1 mapping :
Root ::= SEQUENCE {
uid Uid-group // good : substitution group
}
Uid-group ::= CHOICE {
uid Uid,
uid2 Uid2
}
These corrections impact the user application and all encodings.