ws-commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "keith chapman" <keithgchap...@gmail.com>
Subject [XmlSchema] Adding a facet programaticaly
Date Wed, 01 Aug 2007 09:04:44 GMT
Hi,

I need to create a schema programaticaly. All goes well with simple stuff,
but I had problems when it came to adding enumerations. The
XmlSchemaSimpleTypeRestriction class has the method getFacets() but I dont
see how I can add a Facet as a restriction.

Simple this is the schema I want to create programatically,

           <xs:simpleType name="filter">
                <xs:restriction base="xs:string">
                    <xs:enumeration value="friends"/>
                    <xs:enumeration value="family"/>
                    <xs:enumeration value="both"/>
                    <xs:enumeration value="neither"/>
                </xs:restriction>
            </xs:simpleType>

Any help on this would be appreciated.

Thanks,
Keith

-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message