Bug #3646
closedUse of 'castable as' in xs:assert/@test in XSD 1.1 schemas
0%
Description
If an XSD 1.1 schema defines a simple type 'ST' and an xs:assert/@test contains the expression '... castable as ST', Saxon reports the error 'Unknown simple type ST'.
Files
Updated by Michael Kay almost 7 years ago
- Category set to Schema conformance
- Status changed from New to Rejected
- Assignee set to Michael Kay
Not a bug.
XML Schema 1.1 part 1 §3.13.6.2 XPath Valid rule 2.2.5 states:
2.2.5 The in-scope schema definitions [in the static context for evaluating an assertion] are those components that are present in every schema by definition, as defined in Built-in Attribute Declarations (§3.2.7), Built-in Complex Type Definition (§3.4.7) and Built-in Simple Type Definitions (§3.16.7).
In other words, the types defined in the schema cannot be referenced from within the assertions.
The reason for this rule is to prevent circular definitions. It wouldn't make sense for a type A to require a value to be castable as B, and for B to require the value to be castable as A.
Please register to edit this issue