Hi Sachith,

I'm not familar with that area of code at Castor but I know that its schema model currently has some limitations. To create the above construct you may need to extend it yourself. This kind of work is also included with your GSoC project. I suggest you to fill a new jira issue and attach a patch that adds the required function to Castor schema model.

Regards
Ralf


Sachith Dhanushka schrieb:
Hi,

I asked this questions also as I need this for my SoC project. Can some one please let me know how I can create the following schema fragment programatically?

<xs:simpleType name="creditCardVendor">
    <xs:restriction base="xs:string">
        <xs:enumeration value="VISA"/>
        <xs:enumeration value="AMERICANEXPRESS"/>
        <xs:enumeration value="DISCOVER"/>
    </xs:restriction>
</xs:simpleType>

I was tracing how schema model is created using Sax2ComponentReader. But it uses SimpleTypeDefinition class which is not public, so I can not use it inside my code. I then tried to use Schema.createSimpleType() method but it also seems to be not working.

I would really appreciate if Werner or some one can help me with this as I am stuck with my code since I can not handle simple type definitions.

Thanks.
SD

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

   http://xircles.codehaus.org/manage_email

Reply via email to