Dear all

I'm using the SourceGenerator on the following schema:

<?xml version="1.0" encoding="utf-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema";
 targetNamespace="http://power.inescn.pt/2004/01/compete#";
 xmlns:compete="http://power.inescn.pt/2004/01/compete#";
 elementFormDefault="qualified">

 <element name="PowerSystem">
   <complexType>
     <sequence>
       <element minOccurs="0" maxOccurs="unbounded" ref="compete:Node"/>
       <element minOccurs="0" maxOccurs="unbounded" ref="compete:Line"/>
     </sequence>
     <attribute name="name" type="string"/>
   </complexType>
   <key name="nodeName">
     <selector xpath="compete:Node"/>
     <field xpath="@ID"/>
   </key>
   <keyref name="fromNodeNameRef" refer="compete:nodeName">
     <selector xpath="compete:Line"/>
     <field xpath="compete:from"/>
   </keyref>
   <keyref name="toNodeNameRef" refer="compete:nodeName">
     <selector xpath="compete:Line"/>
     <field xpath="compete:to"/>
   </keyref>
 </element>

 <element name="Node" type="compete:NodeType"/>
 <complexType name="NodeType">
   <sequence/>
   <attribute name="ID" type="integer"/>
   <attribute name="voltage" type="double"/>
 </complexType>

 <element name="Line" type="compete:LineType"/>
 <complexType name="LineType">
   <sequence>
   <element name="from" type="integer"/>
   <element name="to" type="integer"/>
 </sequence>
   <attribute name="ID" type="integer"/>
 </complexType>
</schema>

I've set:

org.exolab.castor.parser.validation=true
org.exolab.castor.parser.namespaces=true
org.exolab.castor.marshalling.validation=true

to require validation and commented out org.exolab.castor.parser and org.exolab.castor.serializer on the castor.properties.file to force using the default JAXP implementation.

I've updated using the "endorsed" mechanism the Xalan on j2se1.4.2 to 2.5.2 and Xerces to 2.6.1 .

I'm getting this stack trace:

org.xml.sax.SAXException: In document: 'file:///home/jpinto/src/eclipse/Test/powersystem.xsd'
Parsing Error : Document is invalid: no grammar found.
Line : 2
Column : 8


at org.exolab.castor.xml.schema.reader.Sax2ComponentReader.error(Sax2ComponentReader.java:281)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(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:372)
at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:425)
at org.exolab.castor.builder.SourceGenerator.main(SourceGenerator.java:760)


Anybody have an idea? Do you believe it is a Xerces issue and should report it to them?

Thank you,

Joćo Luis

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail


----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev




Reply via email to