Hello all,

can someone kindly suggest how to disambiguate two complexTypes of the
same name where one is defined in some XSD file, and the other in
another file which is included (using <xs:include>) in the first?

What syntax is needed in the binding file to have Castor create two
different classes, representing the two (different) definitions?

Changing the XSDs is not desired. Please see below XML samples (headers
etc. omitted for brevity).

-- sample.xsd --
        <xs:import namespace="http://www.ns.com/xml/included";
schemaLocation="included.xsd" />
        <xs:complexType name="SampleType" />

-- included.xsd --
        <xs:complexType name="SampleType" />

-- samplebinding.xml --
        <elementBinding name="/complexType:SampleType">
                <java-class name="XMLSampleType" />
        </elementBinding>


Warning message received is:
 
org.exolab.castor.builder.conflictresolution.InformViaLogClassNameCRStra
tegy dealWithFileOverwrite
  WARNING: src-generated\XMLSampleType.java already exists, but will be
overwritten.


I know that the included file's definition of "SampleType" is not really
used, but I can't simply remove it. I tried including the namespace URL
in the binding, like in, but to no avail.
        <elementBinding
name="/complexType:SampleType{http://www.gtnexus.com/xml/included}";>
                <java-class name="XMLSampleTypeA1" />
        </elementBinding>


Can this be done? Thanks for your support.

Best regards,
Matthias


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

    http://xircles.codehaus.org/manage_email


Reply via email to