Yes, it is, as long as the parser you are trying to use is JAXP compliant.

Regards
Werner

Stephen Winnall wrote:
> Sometimes, with a little application, I can answer my own questions. It
> transpires that Xerces
> has a problem which causes this error. I presume it is possible to use
> something other than
> Xerces with Castor, so I shall try and follow that course.
> 
> Steve
> 
> On 5 May 2006, at 18:16, Stephen Winnall wrote:
> 
>> I tried to generate Java with the source generator from the Dublin
>> Core schemas found at:
>>
>>     http://dublincore.org/schemas/xmls/
>>
>> These appear to be official Dublin Core schemas, so I assume that they
>> are correct. There
>> are several of them, all tied together with <import> statements:
>>
>>     dc.xsd
>>     dcterms.xsd
>>     dcmitype.xsd
>>     qualifieddc.xsd
>>
>> I got the following error and have to admit that my knowledge of XML
>> Schema is insufficient
>> to understand what's going on:
>>
>>     An error occured at line: 121: complexType: LCSHIn a simpleContent
>> when using restriction the base type must be a complexType whose    
>> base is a simpleType.
>>
>> The error is caused at the following statement in dcterms.xsd:
>>
>>  <xs:complexType name="LCSH">
>>    <xs:simpleContent>
>>     <xs:restriction base="dc:SimpleLiteral">
>>         <xs:simpleType>
>>           <xs:restriction base="xs:string"/>
>>         </xs:simpleType>
>>         <xs:attribute ref="xml:lang" use="prohibited"/>
>>     </xs:restriction>
>>    </xs:simpleContent>
>>   </xs:complexType>
>>
>> Can anyone offer insight as to what is wrong? Is this a Castor problem
>> or a schema problem?
>> Is there any work-around for this sort of thing?
>>
>> Steve
>>
>> ------
>> Stephen Winnall
>> CH-8143 Stallikon
>> +41 44 777 9780
>>
>>
>>
>>
>> APPENDIX: stack dump from the above problem.
>>
>> An error occured at line: 121: complexType: LCSHIn a simpleContent
>> when using restriction the base type must be a complexType whose base
>> is a simpleType.
>>         at
>> org.exolab.castor.xml.schema.reader.ImportUnmarshaller.<init>(ImportUnmarshaller.java:202)
>>
>>         at
>> org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.startElement(SchemaUnmarshaller.java:524)
>>
>>         at
>> org.exolab.castor.xml.schema.reader.Sax2ComponentReader.startElement(Sax2ComponentReader.java:253)
>>
>>         at
>> org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
>>         at
>> org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
>> Source)
>>         at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
>> Source)
>>         at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>> Source)
>>         at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>> Source)
>>         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> Source)
>>         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> Source)
>>         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
>> Source)
>>         at
>> org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:430)
>>
>>         at
>> org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:485)
>>
>>         at
>> org.exolab.castor.builder.SourceGenerator.main(SourceGenerator.java:865)
>> followed by various "caused by"s.
>>
>>
>>
>>
>> -------------------------------------------------
>> If you wish to unsubscribe from this list, pleasesend an empty message
>> to the following address:
>>
>> [EMAIL PROTECTED]
>> -------------------------------------------------
>>
> 
> 
> -------------------------------------------------
> If you wish to unsubscribe from this list, pleasesend an empty message
> to the following address:
> 
> [EMAIL PROTECTED]
> -------------------------------------------------
> 
> 


-------------------------------------------------
If you wish to unsubscribe from this list, please 
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to