Hi,
as it stands currently, there's no way to provide a binding for only one
of two identically named 'elements' within a complex type. I guess this
would take us to support xpath-like statements that include e.g.
//complexType:bar/{element}[1]
or similar. Feel free to raise a Jira issue. Any chances of having a
look at the sources yourself ?
Regards
Werner
Stephan wrote:
> Hi!
>
> I'm trying to generate java classes for a schema like this.
>
> <?xml version='1.0'?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:group name="foo">
> <xs:choice>
> <xs:element name="foobar" type="xs:string"/>
> </xs:choice>
> </xs:group>
> <xs:complexType name="bar">
> <xs:sequence>
> <xs:group ref="foo"/>
> <xs:element name="barfoo" type="xs:string"/>
> <xs:group ref="foo"/>
> </xs:sequence>
> </xs:complexType>
> </xs:schema>
>
> The error message I get is "Duplicate name found as a class member: _foo"
>
> I tried automaticConflictResolution and this bindings.xml but still
> get the same error.
>
> <binding xmlns="http://www.castor.org/SourceGenerator/Binding"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.castor.org/SourceGenerator/Binding
> C:\\Castor\\xsd\\binding.xsd"
> defaultBinding="element">
> <elementBinding name="/complexType:bar/foo">
> <member name="foo1"/>
> </elementBinding>
> </binding>
>
> Thank you for help.
>
> Stephan
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email