Hi,
now that answer puzzles me, to be honest. I thought the answer would be
along the lines that you generate Java classes from the XML schemas, and
in such a way that each class generated will end up in separate packages
to be able to distinguish them.
Have I misunderstood your reply ?
Regards
Werner
On 03.08.2010 16:04, Kim, John Y. [Tech] wrote:
Hi, Werner
Thanks for your response.
Yes, we auto-generate java classes from the same schema files.
And they are packaged into a separate jar file.
-----Original Message-----
From: Werner Guttmann [mailto:[email protected]]
Sent: Tuesday, August 03, 2010 8:48 AM
To: [email protected]
Cc: Kim, John Y. [Tech]
Subject: Re: [castor-user] multiple declarations of substitute types of the
same name
Hi,
can I safely assume that you are generating the Java classes for those
XML schemas into separate packages ?
Regards
Werner
On 02.08.2010 19:08, Kim, John Y. [Tech] wrote:
Hi,
I'm using Castor 1.3 for marshalling (generating XML file).
I'm having problem with validating the Castor-driven XML file.
I'm using javax.xml.parsers.DocumentBuilderFactory to validate the xml file (by
setValidating=true).
It occurs when you have two substitute types (of the same name) in two
different xsd files.
For example, let's say we have the following two schema files:
A.xsd
<xsd:schema targetNamespace="A_namespace"
<xsd:element name="name01" type="fpml:name01"/>
.....
B.xsd
<xsd:schema targetNamespace="B_namespace"
<xsd:element name="name01" type="fpml:name01"/>
.....
Then, if you have an object ZZZ (in A_namespace) that contains<name01>
element, Castor erroneously generates:
<ZZZ xmlns="A_namespace">
<ns1:name01 xmlns:ns1="B_namespace"> ...</ns1:name01>
</ZZZ>
I was expecting:
<ZZZ xmlns="A_namespace">
<ns1:name01 xmlns:ns1="A_namespace"> ...</ns1:name01>
</ZZZ>
And the validation fails afterwards.
I need help how to resolve this problem.
Thanks
John
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email