Hello I have a SimpleType defined like so:

<xs:element name="latitude" type="xs:decimal" xs:minInclusive="-90.0"
xs:maxInclusive="90.0"/>

I would like the facets (minInclusive and maxInclusive). So I get the
simple type (latitude) then I enumerate the facets:

if (simple.getTypeCode() == SimpleTypesFactory.DECIMAL_TYPE) {
            System.out.print("DECIMAL_TYPE");
        for (Enumeration facets = simple.getLocalFacets(); facets.hasMoreElements();) {
            Facet f = (Facet) facets.nextElement();
            System.out.println(f.getName() + ": " + f.getValue());
        }
        if(simple.hasFacet("minInclusive")) {
                System.out.print(" minInclusive: " +
                simple.getFacet(Facet.MIN_INCLUSIVE).getValue());
        }
}

That does not work, and I have tried to use SimpleType#getFacets to no
avail, could anyone please tell me how to get the facets? Do I have to
explicitly say it is a SimpleType and have a restriction base? Also I am
confused on what string SimpleType#hasFacet will take, do I have the
correct string?


Thank You

Lloyd

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to