This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 14388 - NOTATION used directly for validation
Summary: NOTATION used directly for validation
Status: CLOSED FIXED
Alias: None
Product: XML Schema Test Suite
Classification: Unclassified
Component: Saxon tests (show other bugs)
Version: 2006-11-06
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema Test Suite mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-05 14:54 UTC by Sandy Gao
Modified: 2011-10-10 18:41 UTC (History)
1 user (show)

See Also:


Attachments

Description Sandy Gao 2011-10-05 14:54:15 UTC
Test: over015.v01.xml
Schema: Override/over015.xsd
XML: Override/over015.v01.xml
Expected validity: valid

Attribute "nota" is declared as having type xs:NOTATION. The attribute appears in the XML file with a value "foo". This violates rule "enumeration facet value required for NOTATION".

This can be fixed by declaring attribute "nota" as having a type derived from xs:NOTATION by specifying enumeration values "foo" and "bar"

An alternative is to
- change "nota" to an element declaration
- add a global simple type "notaType" that restricts xs:NOTATION by specifying enumeration values "foo" and "bar"
- add an xsi:type attribute on <nota> element to point to "notaType"

This latter set of changes also test the clarification that it's OK to declare an element/attribute to have type xs:NOTATION (not a schema error), but it's not OK to use NOTATION to validate a value (a runtime error).
Comment 1 Michael Kay 2011-10-10 16:09:02 UTC
Fixed, along the lines suggested.