Project

Profile

Help

Bug #3646

closed

Use of 'castable as' in xs:assert/@test in XSD 1.1 schemas

Added by Francis Cave about 6 years ago. Updated about 6 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
Schema conformance
Sprint/Milestone:
-
Start date:
2018-01-27
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
9.7
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

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

test-castable-as.xsd (816 Bytes) test-castable-as.xsd Francis Cave, 2018-01-27 16:14
Actions #1

Updated by Michael Kay about 6 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

Also available in: Atom PDF