Project

Profile

Help

Bug #4332

closed

XML Schema 1.1: user defined simple type is unknown in assertion

Added by Frank Steimke over 4 years ago. Updated over 4 years ago.

Status:
Rejected
Priority:
Low
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2019-10-03
Due date:
% Done:

0%

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

Description

Hi,

i have an XML Schema Version 1.1 with an user defined simpleType. I'd like to use that simpleType in an assertion. The idea is, that when the value of an attribute is an instance of the simpletype, there are constraints on other attributes.

However, Saxon tells me the assertion is invalid because the simple type is unknown.

This happens in Oxygen XML Editor 21.1 with Saxon EE 9.8..0.12. Oxygen gives me the opportunity to validate the schema file with Xerces. Doing so shows that the file is valid. So i think it is a bug in Saxon.

I have added a very simple test file.

Sincerely Frank Steimke


Files

test.xsd (227 Bytes) test.xsd Frank Steimke, 2019-10-03 09:18
Actions #1

Updated by Michael Kay over 4 years ago

  • Assignee set to Michael Kay

The static context for evaluation of an XPath expression appearing in an assertion is defined in XML Schema 1.1 part 1 §3.13.6.2 at https://www.w3.org/TR/xmlschema11-1/#xpath-valid

Clause §2.2.5 states that the set of in-scope schema definitions is the set of built-in definitions: that is, you can only reference built-in types and not user-defined types.

The reason for this rule is to prevent circularity. Without it, type A could have an assertion "castable as B", while type B has an assertion "castable as A".

So I think Saxon is doing the right thing here (although I appreciate it's an unwelcome restriction).

Actions #2

Updated by Michael Kay over 4 years ago

  • Status changed from New to Rejected

Please register to edit this issue

Also available in: Atom PDF