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 11178 - [saxonica] Validity status wrongly specified in an instance test
Summary: [saxonica] Validity status wrongly specified in an instance test
Status: RESOLVED FIXED
Alias: None
Product: XML Schema Test Suite
Classification: Unclassified
Component: Saxon tests (show other bugs)
Version: 2006-11-06
Hardware: All All
: P2 major
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema Test Suite mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-30 15:00 UTC by Mukul Gandhi
Modified: 2011-02-07 09:52 UTC (History)
1 user (show)

See Also:


Attachments

Description Mukul Gandhi 2010-10-30 15:00:11 UTC
In the test set file All.testSet from Saxonica the following XSD 1.1 test seems to be wrongly specified:

<testGroup name="all004"
  -> <instanceTest name="all004.v02.xml">

The expected validity of this test is specified as "valid". I believe when instance document all004.v02.xml is attempted to be validated with schema all004.xsd a compliant XSD 1.1 processor must return an "invalid" outcome (the reasons for this are specified below).

In the schema document mentioned above, the element declaration specifies:
<xs:element name="doc" nillable="1">
  ..
</xs:element>

and the instance document is as follows:
<doc xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">


</doc>

Since there are whitespace child nodes within element "doc", the contents of element "doc" are not strictly empty.

To rectify this test case, I would suggest either of following measures:
1. Modify the instance document to remove whitespace children within element "doc", i.e corrected instance document would then be,
<doc xsi:nil="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

OR

2. Modify the test spec of test <instanceTest name="all004.v02.xml">
to say expected validity as "invalid".
Comment 1 Michael Kay 2010-10-30 17:29:39 UTC
Thanks for reporting this. I believe you are correct. As well as revealing an error in the test case, this appears to point to (a) a bug in Saxon, and (b) a serious gap in the coverage of the test suite which this test accidentally filled.
Comment 2 Michael Kay 2011-02-07 09:52:59 UTC
I fixed this a while ago, but failed to record here the fact that I had done so. I changed the v02 instance to contain no whitespace (and therefore be valid), and added an n02 instance which is invalid because it contains whitespace. I am therefore marking this as resolved.