Guys,
Before you dig into it, i shall update you that it works, i
havent figured out why, i moved those files to a different directory, C:/Castor/
and it started working. i really wonder if the other directory is haunted
!
now that i ve crossed the first barrier, am happy, as i
move into more things, more headaches, and i shall again ask you folks
for support.
From: Shalni Kumar [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 15, 2006 2:31 PM
To: dev@castor.codehaus.org
Subject: Re: [castor-dev] Simplest Query..
Hi Vinodh,
I have not tried with
castor-1.0M1-xml.jar., however i observed that
the xsd that u have provided is not a valid one. If u are decalring
a complexType in your XSD then u must have a element that uses that
type...
i think.....!!!!
so u can try with the following XSDs and check it
out
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="product" type="Aa"/>
<xs:complexType name="Aa">
<xs:sequence>
<xs:element name="Bb" type="xs:string"/>
<xs:element name="Cc" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<xs:element name="product" type="Aa"/>
<xs:complexType name="Aa">
<xs:sequence>
<xs:element name="Bb" type="xs:string"/>
<xs:element name="Cc" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
OR the following
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="A">
<xs:complexType>
<xs:sequence>
<xs:element name="B" type="xs:string"/>
<xs:element name="C" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="A">
<xs:complexType>
<xs:sequence>
<xs:element name="B" type="xs:string"/>
<xs:element name="C" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Hope this helps ...
-- > Shalini
"Vinodh Rajaraman (vrajaram)" <[EMAIL PROTECTED]> wrote:
Hi,I would be obliged if someone could tell me, whats happening below. as such, i got intro'ed to Castor only a few days back, so kindly excuse my ignorance and help me out.Am trying to use Source generator - windows XP, using castor-1.0M1-xml.jar. i didnt set any property file or castorbuilder file,etc..the xsd file..simplest form..chosen, am getting Parser error, no matter what i try. kindly point out my mistakes..thanks a lot..<?xml version="1.0"?><complexType name="A"><sequence><element name="B" type="string"/><element name="C" type="string"/></sequence></complexType>now in cmd prompt in WindowsC:\EnterInfo\Projects\Seeds\SeedFile\Code\vinod>java org.exolab.castor.builder.SourceGenerator -i example.xsdorg.xml.sax.SAXException: In document: 'file:///C:/EnterInfo/Projects/Seeds/SeedFile/Code/vinod/example.xsd'Parsing Error : Element type "complexType" must be declared.Line : 3Column : 23at org.exolab.castor.xml.schema.reader.Sax2ComponentReader.error(Sax2ComponentReader.java:281)at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1186)at org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1698)at org.apache.xerces.validators.common.XMLValidator.validateElementAndAttributes(XMLValidator.java:3383)at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1155)at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1862)at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1005)at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:411)at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:466)at org.exolab.castor.builder.SourceGenerator.main(SourceGenerator.java:846)C:\EnterInfo\Projects\Seeds\SeedFile\Code\vinod>
Yahoo! Travel
Find great deals to the top 10 hottest destinations!