Hello,
XJC reports an error:
[ERROR] The value specified in the default attribute "v1.0" is not a valid value
for the datatype
line 11 of TestSchema.xsd
for the following schema:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema
targetNamespace='
http://www.test.net/v1'
xmlns='
http://www.test.net/v1'
xmlns:xsd='
http://www.w3.org/2001/XMLSchema'
elementFormDefault='qualified'
attributeFormDefault='unqualified'
version='v1.0'>
<xsd:element name='Base' type='BaseType'/>
<xsd:complexType name='BaseType'>
<xsd:attribute ref='myVer' use='required'/>
<xsd:attribute ref='score' use='optional'/>
</xsd:complexType>
<xsd:attribute name='myVer' type='xsd:string' default="v1.0"/>
<xsd:attribute name='score' type='xsd:decimal'/>
</xsd:schema>
If default value for myVer is changed to "1.0" ( decimal ) code is generated
successfully.
If score attribute is changed to xsd:string code is generated successfully.
If any valid default value is assigned to score code is generated successfully.
Any thoughts?
Sincerely,
Benjamin.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net