Forum Discussion

SmartBear_Suppo's avatar
16 years ago

The facet 'enumeration' does not apply... error

Hello,

The problem is that you probably have something simmilar to the following in your XSD:


<xs:restriction base="xs:boolean">
    <xs:enumeration value="true" />
    <xs:enumeration value="false" />
</xs:restriction>


This is not allowed in the XSD spec (and is also quite meaningless, as it wouldn't prevent the use of "0" and "1" values as these are lexical representations of the same values as "true" and "false"), and thus, soapUI will complain about it. You can fix this by using a pattern instead, if you wish to limit the lexical representations of the values:


<xs:restriction base="xs:boolean">
    <xs:pattern value="true" />
<xs:pattern value="false" />
</xs:restriction>


Regards,
Dain
eviware.com
No RepliesBe the first to reply