background image

External Customize Example

<< Datatype Converter Example | JAXB Version Number >>
<< Datatype Converter Example | JAXB Version Number >>
56
U
SING
JAXB
<xsd:minInclusive value="10000"/>
<xsd:maxInclusive value="99999"/>
</xsd:restriction>
</xsd:simpleType>
External Customize Example
The External Customize example is identical to the Datatype Converter example,
except that the binding declarations in the External Customize example are made
by means of an external binding declarations file rather than inline in the source
XML schema.
The binding customization file used in the External Customize example is
<INSTALL>/examples/jaxb/external-customize/binding.xjb
.
This section compares the customization declarations in
bindings.xjb
with the
analogous declarations used in the XML schema,
po.xsd
, in the Datatype Con-
verter example. The two sets of declarations achieve precisely the same results.
· JAXB Version, Namespace, and Schema Attributes
· Global and Schema Binding Declarations
· Class Declarations
JAXB Version, Namespace, and Schema
Attributes
All JAXB binding declarations files must begin with:
· JAXB version number
· Namespace declarations
· Schema name and node
The version, namespace, and schema declarations in
bindings.xjb
are as fol-
lows:
<jxb:bindings version="1.0"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<jxb:bindings schemaLocation="po.xsd" node="/xs:schema">
.
<binding_declarations>