Hi Manuel,
as far as I remember, we support for <enumType> bindings for global
simpletype definitions (that have enum facets) only (currently). Any
chances you can change your XML schema ?
Werner
Manuel G. Chacon wrote:
> Basic Info -- Using Castor 1.1.2.1 via the Maven2 Plugin version 2.0-alpha1
>
> I know that Castor is picking up my binding.xml file because I have a
> couple <elementBinding> tags in the binding.xml I am using to avoid
> collision that are working fine. So I know that the basic configuration
> is set up correctly.
>
> The problem I am having deals with the <enumBinding>. I have several
> elements within my .xsd that have nested <xs:simpleType> with the name
> "Status". I am unable to figure out how to use the <enumBinding> tag to
> generate individual classes for each nested <xs:simpleType>
>
> Sample of First XML Element .xsd
> <xs:element minOccurs="0" name="MyElementNameA">
> <xs:complexType>
> <xs:all>
> <xs:element minOccurs="0" name="Status">
> <xs:simpleType>
> <xs:restriction base="xs:token">
> <xs:enumeration value="StatusValueX" />
> <xs:enumeration value="StatusValueY" />
> <xs:enumeration value="StatusValueZ" />
> </xs:restriction>
> </xs:simpleType>
> </xs:element>
>
> Sample of Second XML Element .xsd
> <xs:element minOccurs="0" name="MyElementNameB">
> <xs:complexType>
> <xs:all>
> <xs:element minOccurs="0" name="Status">
> <xs:simpleType>
> <xs:restriction base="xs:token">
> <xs:enumeration value="StatusValue1" />
> <xs:enumeration value="StatusValue2" />
> <xs:enumeration value="StatusValue3" />
> </xs:restriction>
> </xs:simpleType>
> </xs:element>
>
> I need to point the <enumBinding > tag to a nested <xs:simpleType> that
> is a few levels deep within my .xsd. This is a snippet of my
> binding.xml file. Can anybody tell me what I am doing wrong please?
>
> <enumBinding
> name="/enumType:/RootElement/ChildElement/MyElementNameA/Status">
> <enum-def>
> <enumClassName>ElementNameAStatus</enumClassName>
> </enum-def>
> </enumBinding>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email