Hi Werner,
Thanks for your response.  I did try the absolute path, file:///C:/child.xsd,
but its not working.   Can you pls, provide me a sample
Thanks
Kannan

-----Original Message-----
From: Werner Guttmann [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 10, 2007 2:56 AM
To: [email protected]
Subject: Re: [castor-user] SchemaLocation based package generation using
Castor (source generator) binding.xsd is not working


Hi,

you will have to use an absolute path in the <schemaLocation> element of 
your binding file for this to work.

Werner

Jayaraman, Kannan wrote:
> I have the following 2 xsd's (which I wish to generate in their own 
> packages, using castor custom binding xml, based on binding.xsd ). 
> However, I have no luck in generating them in separate packages. I can 
> however do so, if I drive it by namespace. Pls, help me, with what I'm 
> doing wrong. Here are the 2 xsd's, and the binding.xml.
> Thanks
> Kannan
> 1. parent.xsd
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns="http://www.castor.org/parent";
> xmlns:xs="http://www.w3.org/2001/XMLSchema";
> elementFormDefault="qualified"
> targetNamespace="http://www.castor.org/parent";
> attributeFormDefault="unqualified">
> <xs:include schemaLocation="child.xsd"/>
> <xs:element name="Parent">
> <xs:complexType>
> <xs:sequence>
> <xs:element ref="Child"/>
> <xs:element name="parentDate" type="xs:dateTime" minOccurs="0"/>
> <xs:element name="parentName" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> 2. child.xsd
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema
> xmlns:xs="http://www.w3.org/2001/XMLSchema";
> elementFormDefault="qualified"
> attributeFormDefault="unqualified">
> <xs:element name="Child">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="childDate" type="xs:dateTime" minOccurs="0"/>
> <xs:element name="childName" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> 3. binding2.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <p:binding defaultBindingType="element" xmlns 
> ole0.bmp="http://www.castor.org/SourceGenerator/Binding";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://www.castor.org/SourceGenerator/Binding 
> binding.xsd">
> <p:package>
> <p:name><![CDATA[com.test]]></p:name>
> <p:schemaLocation><![CDATA[parent.xsd]]></p:schemaLocation>
> </p:package>
> <p:package>
> <p:name><![CDATA[com.test.child]]></p:name>
> <p:schemaLocation><![CDATA[child.xsd]]></p:schemaLocation>
> </p:package>
> </p:binding>
> 4. Command Line
> java org.exolab.castor.builder.SourceGeneratorMain -i parent.xsd 
> -binding-file binding2.xml
> <<binding2.xml>> <<parent.xsd>> <<child.xsd>>
> 
> Please help  !!!
> Thanks 
> Kannan
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to