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 4056 - elemT026 - illegal xsi:type
Summary: elemT026 - illegal xsi:type
Status: RESOLVED FIXED
Alias: None
Product: XML Schema Test Suite
Classification: Unclassified
Component: Microsoft tests (show other bugs)
Version: 2006-11-06
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Henry S. Thompson
QA Contact: XML Schema Test Suite mailing list
URL:
Whiteboard: metadata updated 2008-11-11
Keywords:
: 4227 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-12-09 15:44 UTC by Michael Kay
Modified: 2010-02-03 15:18 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2006-12-09 15:44:26 UTC
In the Microsoft Element tests, group elemT026, the instance has 

<test2 xsi:type="Union-A">1</test2>

where Union-A is a union type with A (the declared type of test2) as its only member.

From my reading of the specification (Schema Component Constraint: Type Derivation OK (Simple)), Union-A is not validly derived from A, so the instance is invalid under clause 4.3 of Validation Rule: Element Locally Valid (Element).

Very similar problems affect elemT027, elemT028, and elemT029.
Comment 1 Michael Kay 2006-12-09 15:47:15 UTC
The same problem affects:

   <test group="elemT054" name="elemT054.v"/>
   <test group="elemT055" name="elemT055.v"/>
   <test group="elemT056" name="elemT056.v"/>
   <test group="elemT057" name="elemT057.v"/>
Comment 2 Henry S. Thompson 2006-12-09 17:58:05 UTC
The declared type of test2 is the ur-type, so I agree the result should 'invalid', but not for the reason you give. . .

XSV says:

  <invalid char="2" code="cvc-elt.4.3" line="2"
           resource="file:///C:/cygwin/tmp/elemT026.xml">xsi:type {None}:Union-A is not allowed to substitute for the declared type anyType</invalid>
Comment 3 Zafar Abbas 2007-01-29 22:43:44 UTC
Agreed that the expected outcome of this test should be invalid. We are
following up with the WG to determine the process of updating the test suite.
Comment 4 Michael Kay 2008-06-21 15:38:29 UTC
Agreed. These instances are invalid because the element declaration in each case blocks restriction (and not for the reason stated in the original bug report).
Comment 5 Henry S. Thompson 2010-02-03 15:18:08 UTC
*** Bug 4227 has been marked as a duplicate of this bug. ***