Hi Nathan, you should use the CVS version, it should fix your problem.
Arnaud > -----Original Message----- > From: Green, Nathan [mailto:[EMAIL PROTECTED]] > Sent: Friday, October 19, 2001 2:04 PM > To: [EMAIL PROTECTED] > Subject: [castor-dev] SourceGenerator IllegalArgumentException on 'use' > & 'default' attributes > > > First, I am using Castor 0.9.3. Second, if I comment out the > offending tags, the SourceGenerator works fine. > > Stack trace (cleaned up a bit): > 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.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:1862) > at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher > .dispatch(XMLDocumentScanner.java:1238) > 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) > > And the relevant part of the schema: > <xsd:attribute name="DefaultValueForField" type="xsd:string" default="D" > use="optional"/> > > I've tried moving the order of default and use, but (as expected) > that did nothing to help the problem. Any ideas? > > Nathan Green > > ----------------------------------------------------------- > If you wish to unsubscribe from this mailing, send mail to > [EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
