According to:
http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-TokenizedType
xml elements/attributes of type ID must start w/ a non-numerical character.
When I validate my xml against a schema using the mvs tool from Sun, mvs immediately complains about:
<DATA_SERVER_SET OID="1" Name="DefaultDataServerSet">
in the following manner:
Line: 2 Column: 159 Cause: null Local msg: attribute "OID" has a bad value: "0" does not satisfy the "ID" type Msg: attribute "OID" has a bad value: "0" does not satisfy the "ID" type com.sun.msv.verifier.ValidityViolation: attribute "OID" has a bad value: "0" does not satisfy the "ID" type at com.sun.msv.verifier.Verifier.onError(Verifier.java:319)
When defined in schema as:
<xsd:complexType name="DataServerSet" >
<xsd:sequence>
<xsd:element name="DATA_SERVER" type="DataServer""/>
</xsd:sequence>
<xsd:attribute name="Name" type="xsd:string" use="required"/>
<xsd:attribute name="OID" type="xsd:ID"/>
</xsd:complexType>
JAXB will cheerfully use the same schema to generate its classes, un-marshal and marshal the same XML w/ narry a complaint!
I'll assume I'm doing something wrong and its not a bug. Does anyone have an idea as to what's going on?