<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>11178</bug_id>
          
          <creation_ts>2010-10-30 15:00:11 +0000</creation_ts>
          <short_desc>[saxonica] Validity status wrongly specified in an instance test</short_desc>
          <delta_ts>2011-02-07 09:52:59 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Schema Test Suite</product>
          <component>Saxon tests</component>
          <version>2006-11-06</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mukul Gandhi">gandhi.mukul</reporter>
          <assigned_to name="C. M. Sperberg-McQueen">cmsmcq</assigned_to>
          <cc>mike</cc>
          
          <qa_contact name="XML Schema Test Suite mailing list">public-xml-schema-testsuite</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>41872</commentid>
    <comment_count>0</comment_count>
    <who name="Mukul Gandhi">gandhi.mukul</who>
    <bug_when>2010-10-30 15:00:11 +0000</bug_when>
    <thetext>In the test set file All.testSet from Saxonica the following XSD 1.1 test seems to be wrongly specified:

&lt;testGroup name=&quot;all004&quot;
  -&gt; &lt;instanceTest name=&quot;all004.v02.xml&quot;&gt;

The expected validity of this test is specified as &quot;valid&quot;. 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 &quot;invalid&quot; outcome (the reasons for this are specified below).

In the schema document mentioned above, the element declaration specifies:
&lt;xs:element name=&quot;doc&quot; nillable=&quot;1&quot;&gt;
  ..
&lt;/xs:element&gt;

and the instance document is as follows:
&lt;doc xsi:nil=&quot;1&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;


&lt;/doc&gt;

Since there are whitespace child nodes within element &quot;doc&quot;, the contents of element &quot;doc&quot; 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 &quot;doc&quot;, i.e corrected instance document would then be,
&lt;doc xsi:nil=&quot;1&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; /&gt;

OR

2. Modify the test spec of test &lt;instanceTest name=&quot;all004.v02.xml&quot;&gt;
to say expected validity as &quot;invalid&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41873</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-10-30 17:29:39 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45170</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-02-07 09:52:59 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>