You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Mukul Gandhi <ga...@gmail.com> on 2009/07/06 07:35:24 UTC
[XML Schema 1.1] bug with type alternative implementation?
Hi all,
I tried XML Schema 1.1 validation (using latest Xerces-J
xml-schema-1.1-dev code from SVN) with following examples:
XSD 1.1 document
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="test" type="xs:anyType">
<xs:alternative test="@type='I'" type="xs:integer"/>
<xs:alternative test="@type='S'" type="xs:string"/>
<xs:alternative test="@type='F'" type="xs:float"/>
<xs:alternative type="xs:string"/>
</xs:element>
</xs:schema>
XML document
<test type="I">abc</test>
With the above example, Xerces reports the XML document as valid.
Shouldn't the validation fail in this case (since value 'abc' is not
an integer)?
Would this be a bug, that needs to be fixed?
--
Regards,
Mukul Gandhi
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org