I have just tried the SourceGenerator of castor-0.9.3.jar with an xsd
containing the following lines:
<xsd:attribute name="TrafficInfo" use="optional" default="static">
<xsd:simpleType>
<xsd:restriction>
<xsd:enumeration value="static"/>
<xsd:enumeration value="dynamic"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
The XSD has been created with XML Spy 4.2 and XML Spy can validate it.
SourceGenerator ends with the following exception:
java.lang.IllegalArgumentException: When 'default' is present, the 'use'
attribute must have the value 'optional'.
at
org.exolab.castor.xml.schema.reader.AttributeUnmarshaller.<init>(AttributeUnmarshaller.java:136)
at
org.exolab.castor.xml.schema.reader.ComplexTypeUnmarshaller.startElement(ComplexTypeUnmarshaller.java:234)
at
org.exolab.castor.xml.schema.reader.ElementUnmarshaller.startElement(ElementUnmarshaller.java:233)
at
org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.startElement(SchemaUnmarshaller.java:305)
at
org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1340)
at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1214)
at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1806)
at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1182)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
at
org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:357)
at
org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:410)
at
org.exolab.castor.builder.SourceGenerator.main(SourceGenerator.java:637)
The piece of code above is definitely the only place wher use and
default appear.
Could not find hints in the mailing list.
I cannot try with 0.9.3.9 because I cannot download it.
I'd be grateful for help - I need the output to convince some people in
my project that Java Binding is useful ...
regards, Annette
--
Dr. Annette S�ndermann
SME - Science Management and Engineering AG
Steininger Weg 3
D-85748 Garching
Germany
Tel +49/89/32 67 40 36
Fax +49/89/32 67 40 66
http://www.sme.de
[EMAIL PROTECTED]
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev