Hi Werner,
i must create a schema document like:

<SCHEMA ...other schema informations like namespaces, import...>
    <XS:ELEMENT name="root" type="Troot">
    <XS:COMPLEXTYPE name="Troot">
           <XS:SEQUENCE>
                <XS:ELEMENT name="cat" type="Tcat"/>
                <XS:ELEMENT name="dog" type="Tdog"/>
           </XS:SEQUENCE>
    </XS:COMPLEXTYPE>
    <XS:SIMPLETYPE name="Tcat" type="string"/>
    <XS:SIMPLETYPE name="Tdog">
        <XS:RESTRICTION base="xs:string">
               <xs:pattern value="\d{3}-[A-Z]{2}"/>
        </XS:RESTRICTION>
    </XS:SIMPLETYPE>
</SCHEMA>

I can create a schema, I can create complexType as

ComplexType ct = new ComplexType("Troot")

i can create a group and a sequence inside the complex type and the
ElementDecl but I don't understand what must i do to create any sympleType
and any restrictions on it because

SimpleType st = new SimpleType("Tcat") gives me an error and
in
SimpleType st = new SimpleType("Tcat",string,string) 
i don't know the two string parameters

Thank you very much,

upino


Werner Guttmann wrote:
> 
> Hi,
> 
> can you supply me with a Java code fragment that you think should work, 
> and I will have a look to get an idea why it isn't, and what needs to be 
> done to get this working ?
> 
> Regards
> Werner
> 
> upino wrote:
>> Hi,
>> i'm tring to write an XSD file using castor.
>> 
>> I have no problems to create my complexType but i can't create any
>> simpleType.
>> 
>> I would like to write
>> <simpletype name="pippo" type="xs:string"/>
>> in a schemafile, but i can't instaziate the class simpleType.
>> 
>> Can someone post me an example of code?
>> 
>> Thanks a lot,
>> 
>> upino
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Create-a-simpleType-tp15093040p15118700.html
Sent from the Castor - User mailing list archive at Nabble.com.


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

    http://xircles.codehaus.org/manage_email

Reply via email to