I was just about to suggest the same .. ;-). Thanks for coming back to us.
Regards
Werner
Ted Ljungberg XX wrote:
Hi,
Please ignore this message there was no problem, I've must been having
some typo in the bindingname... (name="/foo" works fine).
Ted
------------------------------------------------------------------------
*From:* Ted Ljungberg XX [mailto:[EMAIL PROTECTED]
*Sent:* den 14 mars 2008 14:29
*To:* [email protected]
*Subject:* [castor-user] Howto address ref in binding file?
Hi,
I'm using Castor 1.2 to generate Java code but having problem to change
name of a generated class when using "ref" in the schema file. What am I
supposed to write in the binding file for this situation:
schema file:
<xsd:element name="root" type="root_type/>
<xsd:complexType name="root_type">
<xsd:sequence>
<xsd:element ref="foo"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="foo">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="bar" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
...to change the name of the generated class for the "foo" element. I've
tried this:
<elementBinding name="/complexType:root_type/foo">
<java-class name="FooBar"/>
</elementBinding>
Nope, doesn't work... How about this then:
<complexTypeBinding name="foo">
<java-class name="FooBar"/>
</complexTypeBinding>
No luck. I've tried all sorts of combinations for the bindingname
without success, the java class "foo" is always generated. What am I
doing wrong here?
There is no problem to change the name to FooBar if I remove the ref and
move the element under the root_type.
TIA
Ted
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email