Community
Participate
Working Groups
Build Identifier: I20090313-0100 Let's say we have following XML document, <X> <a>pass</a> </X> and it's validated by the following schema, <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="X"> <xs:complexType> <xs:sequence> <xs:element name="a" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> <xs:simpleType name="STATUS"> <xs:restriction base="xs:string"> <xs:enumeration value="pass"/> <xs:enumeration value="fail"/> </xs:restriction> </xs:simpleType> </xs:schema> Now when we evaluate an expression like following (within the context of above XML and schema documents), X/a castable as STATUS then this expression evaluation should be aware of the simple type definition STATUS. This is particularly useful in scenarios where we use XML Schema 1.1 assertions as follows, <xs:element name="X"> <xs:complexType> <xs:sequence> <xs:element name="a" type="xs:string"/> </xs:sequence> <xs:assert test="a castable as STATUS" /> </xs:complexType> </xs:element> I've written a patch for this, and would be committing it asap along with a test case. Reproducible: Always
I've committed the changes to service branch. Still not committing to HEAD location, since we need to sort few API issues for this fix, as per new API design and also not committing test cases for this at the moment (since that is also held due to newer API issues). I'm leaving this bug report as NEW at the moment.