<?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>2666</bug_id>
          
          <creation_ts>2006-01-06 02:02:52 +0000</creation_ts>
          <short_desc>remaining dependence on schema import</short_desc>
          <delta_ts>2006-08-09 10:12:30 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Query Test Suite</product>
          <component>XML Query Test Suite</component>
          <version>0.9.0</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Carlisle">davidc</reporter>
          <assigned_to name="Jinghao Liu">jinghaol</assigned_to>
          <cc>frans.englich</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>7660</commentid>
    <comment_count>0</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2006-01-06 02:02:53 +0000</bug_when>
    <thetext>this is really a continuation of bug #1997, but there are still cases where the
supplied result files assume schema validated input.

for example LocalNameFromQNameFunc001.xq if the input has not been validated
the function will generate an error as you can&apos;t cast the untyped input to a
QName as required input to the function. Many of the tests in that test group
have the same problem.

David</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8287</commentid>
    <comment_count>1</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-02-16 15:17:38 +0000</bug_when>
    <thetext>David:

I will look into this.

Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8497</commentid>
    <comment_count>2</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2006-03-01 17:01:17 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; David:
&gt; 
&gt; I will look into this.
&gt; 
&gt; Carmelo
Thanks, I think that the following tests show this problem in one form or another.


Comp-notation-2
Constr-cont-constrmod-2
Constr-cont-constrmod-4
Constr-cont-constrmod-6
Constr-cont-constrmod-8
Constr-compelem-compname-9
Constr-compelem-constrmod-2
Constr-compelem-constrmod-4
Constr-compelem-constrmod-6
Constr-compelem-constrmod-8
Constr-compattr-compname-9
Constr-docnode-constrmod-2
Constr-docnode-constrmod-4
ForExprType022
ForExprType023
ForExprType024
ForExprType025
ForExprType026
ForExprType027
ForExprType036
ForExprType037
ForExprType038
ForExprType039
ForExprType040
ForExprType041
ForExprType042
ForExprType043
ForExprType044
ForExprType048
ForExprType049
ForExprType050
ForExprType051
ForExprType052
ForExprType053
orderBy25
orderBy27
orderBy57
casthcds2
casthcds8
casthcds9
casthcds10
casthcds13
casthcds14
casthcds23

LocalNameFromQNameFunc001
LocalNameFromQNameFunc002
LocalNameFromQNameFunc003
LocalNameFromQNameFunc004
LocalNameFromQNameFunc018
LocalNameFromQNameFunc019
LocalNameFromQNameFunc020
NamespaceURIFromQNameFunc001
NamespaceURIFromQNameFunc002
NamespaceURIFromQNameFunc003
NamespaceURIFromQNameFunc004
NamespaceURIFromQNameFunc018
NamespaceURIFromQNameFunc019
NamespaceURIFromQNameFunc020
fn-idref-5
fn-idref-6
fn-idref-7
fn-idref-8
fn-idref-9
fn-idref-10
fn-idref-11
fn-idref-12
fn-idref-13
fn-idref-14
fn-idref-15
fn-idref-16
fn-idref-17
fn-idref-18
fn-idref-19
fn-idref-20
fn-idref-21</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8590</commentid>
    <comment_count>3</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-03-06 19:54:11 +0000</bug_when>
    <thetext>David:

Thanks for the list.  It will be a while before I get to them all.

Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9060</commentid>
    <comment_count>4</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-04-06 20:15:56 +0000</bug_when>
    <thetext>David:

I looked at the NIST test and either:

1) You may ignore the schema import statement as the results
are not affected by usage of schema.

2) Some of the tests use a new testing approach as suggested
by Michale Kay in a different Bug. (casthcds2,casthcds8,casthcds10,casthcds13,
casthcds14,casthcds23).

Assigning the bug to Microsoft for them to work on their tests.

Thanks,
Carmelo

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9062</commentid>
    <comment_count>5</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2006-04-06 21:31:44 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; David:
&gt; 
&gt; I looked at the NIST test and either:

&gt; 1) You may ignore the schema import statement as the results
&gt; are not affected by usage of schema.
&gt; 
Sorry about that.
My test harness always ignores the schema import (or at least makes it into a namespace decln) but if it then fails a test that has a schemaimport it flags it as a test that has an uncatalogued dependence on schema import (or PSVI input) and that automatically generated list is the one I posted. I&apos;m not sure exact;y which are &quot;NIST tests&quot; but I just noticed orderby25 has your name in the catalogue so I rechecked that one and I agree it looks fine to me.
Hmm that means there must be another reason that I&apos;m failing the test, such as my code being broken, oh well something to keep me busy over easter...

David</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9128</commentid>
    <comment_count>6</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2006-04-10 22:26:53 +0000</bug_when>
    <thetext>just to confirm the inclusion of orderby25 in my list in this report was spurious, sorry. It does use a schema import and I do fail it but that wasn&apos;t the reason.
It&apos;s the xs:float(-0) issue reported in bug #2936, so hopefully this one will pass once the next version of the test suite comes out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9348</commentid>
    <comment_count>7</comment_count>
    <who name="Jinghao Liu">jinghaol</who>
    <bug_when>2006-04-21 01:56:32 +0000</bug_when>
    <thetext>I have verified all Microsoft tests.  They all get the same results without schema.  Thus no issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9446</commentid>
    <comment_count>8</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-04-25 18:11:24 +0000</bug_when>
    <thetext>Dave:

The issue should go away as well with bug 2396.  I will mark this as fixed
once more.

Thanks,
Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9764</commentid>
    <comment_count>9</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2006-05-12 14:14:37 +0000</bug_when>
    <thetext>This was marked as resolved fixed but most of the tests appear to be unchanged in 9.0
for example ForExprType025.xq still has
for $test as attribute(*,xs:decimal)
which clearly can only work as intended if the input document is input from a PSVI.

As stated in earlier bug reports and in the initial comment in this one, it&apos;s not just the explict &quot;schema import&quot; that causes dependence on a schema aware system, but assumption that the input has been schema validated.

I assume that this is a &quot;Microsoft Test&quot; so comment #7 appears to be in error, so I have reopened the report. see also bug #3276

David
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9830</commentid>
    <comment_count>10</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-05-17 18:16:06 +0000</bug_when>
    <thetext>David:

That is correct.  Jinghao, do you mind re taking a second look at this?

Thanks,
Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10323</commentid>
    <comment_count>11</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2006-06-28 22:13:41 +0000</bug_when>
    <thetext>since there doesn&apos;t seem to have been any movement on this report for a while I thought I&apos;d give further details and possible solutions on just one of the affected tests, Constr-cont-constrmod-4.xq similar comments will apply to the other tests.

Constr-cont-constrmod-4.xq  has
import schema namespace atomic=&quot;http://www.w3.org/XQueryTest&quot;;
In all cases where this appears in the minimal conformance area of the test suite it&apos;s essentially a bug just waiting to happen.
Either the schema import is really needed, in which case the test should be in the optional schema import area, or the test can proceed just with a namespace declaration, in which case the test should just have that, rather than make the test harnesses make that change, or, as in this case, the import is just spurious and can be deleted, as the query doesn&apos;t use any types or element definitions from the atomic: namespace in a query expression.

If the schema import is changed to a namespace declaration as allowed by the test guidelines then the expected result is not generated if the input is not derived from a PSVI as you get
 FORG0001: Cannot convert string &quot;12678967.543233&quot; to an integer
As in other places, the catalogue could add the expected error but that as always greatly weakens the test as it means that the actual feature that the test is purporting to test is not being tested at all.
It&apos;s not really clear what this test is testing as it&apos;s a strange mix of element construction modes and atomic type coercions, and the description in the catalogue and the comments are rather terse. So I&apos;m not really sure what to suggest but deleting the schema import and adding an explicit coersion to xs:decimal means that the Expected result is obtained, so perhaps I could suggest:

(: insert-start :)
declare variable $input-context external;
(: insert-end :)

&lt;elem&gt;{$input-context//*:decimal}&lt;/elem&gt;/*/xs:decimal(.) cast as xs:integer</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10366</commentid>
    <comment_count>12</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2006-07-05 12:24:08 +0000</bug_when>
    <thetext>Ups! It was not my intention to resolve this bug. Changing status to REOPENED. I blame a lot of things for this annoying mistake: the weather(good or bad, both will do), and that Denmark didn&apos;t qualify for the world cup.

Again, sorry for the noise.


Frans</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10451</commentid>
    <comment_count>13</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2006-07-10 22:46:42 +0000</bug_when>
    <thetext>using the july 10 version of xqts_current.zip the number of tests with schema related
problems reported by xq2xsl is now down to

Comp-notation-5
Comp-notation-8
Comp-notation-10
Comp-notation-11
Comp-notation-12
Comp-notation-13
Comp-notation-14
Comp-notation-19
Comp-notation-20
Comp-notation-21
Constr-cont-constrmod-4
Constr-cont-constrmod-8
Constr-compelem-compname-9
Constr-compattr-compname-9
ForExprType025
ForExprType026
ForExprType027
ForExprType038
ForExprType039
ForExprType040
ForExprType041
ForExprType042
ForExprType043
ForExprType044
ForExprType049
ForExprType050
ForExprType051
ForExprType052
ForExprType053
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10459</commentid>
    <comment_count>14</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2006-07-12 00:05:38 +0000</bug_when>
    <thetext>(In reply to comment #13)
In addition to the list in comment #13, LocalNameFromQNameFunc001.xq and all its siblings also have this problem, as originally mentioned in comment #0
(LocalNameFromQNameFunc00x no longer uses schema import, so my test harness just &quot;fails&quot; this without flagging it as a possible PSVI problem, hence these were not listed in the list on comment #13)

David</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10555</commentid>
    <comment_count>15</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2006-07-18 13:49:06 +0000</bug_when>
    <thetext>Another test is qname-cast-1, I think.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10579</commentid>
    <comment_count>16</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-07-18 19:56:50 +0000</bug_when>
    <thetext>For the following group:

Comp-notation-5
Comp-notation-8
Comp-notation-10
Comp-notation-11
Comp-notation-12
Comp-notation-13
Comp-notation-14
Comp-notation-19
Comp-notation-20
Comp-notation-21
qname-cast-1

The schema import is critical to the test and thus required.  I can move this tests to one of teh schema areas and keep both notations on teh catalog.  This will ensure the coverage is not lost with the move.

Thanks,
Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10582</commentid>
    <comment_count>17</comment_count>
    <who name="Jinghao Liu">jinghaol</who>
    <bug_when>2006-07-18 23:06:58 +0000</bug_when>
    <thetext>I plan to do the same for 

ForExprType025
ForExprType026
ForExprType027
ForExprType038
ForExprType039
ForExprType040
ForExprType041
ForExprType042
ForExprType043
ForExprType044
ForExprType049
ForExprType050
ForExprType051
ForExprType052
ForExprType053

What I plan to do is just updating XQTSCatalog.xml file to move those tests under 2 Optional Features -&gt; 2.7 FOR Clause with TypeDeclaration.  
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10583</commentid>
    <comment_count>18</comment_count>
    <who name="Jinghao Liu">jinghaol</who>
    <bug_when>2006-07-19 01:15:29 +0000</bug_when>
    <thetext>I have moved following test under Optional Features.

ForExprType025
ForExprType026
ForExprType027
ForExprType038
ForExprType039
ForExprType040
ForExprType041
ForExprType042
ForExprType043
ForExprType044
ForExprType049
ForExprType050
ForExprType051
ForExprType052
ForExprType053</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10585</commentid>
    <comment_count>19</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2006-07-19 11:15:14 +0000</bug_when>
    <thetext>(In reply to comment #18)
&gt; I have moved following test under Optional Features.

Where has this change happened? XQTSCatalog has not changed in the public cvs

http://dev.w3.org/cvsweb/2006/xquery-test-suite/TestSuiteStagingArea/XQTSCatalog.xml

it makes it difficult if the report is marked fixed before the original reporter has a chance to see the change.

Also while comment #16 and comment #18 list some of the files for which the problem occurs, that still leaves several more, see for example comment #11

so I&apos;ve re-opened the report (for the 3rd time, sadly).

David</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10586</commentid>
    <comment_count>20</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2006-07-19 11:40:35 +0000</bug_when>
    <thetext>(In reply to comment #16)
&gt; For the following group:

&gt; qname-cast-1
&gt; 
&gt;

qname-cast-1 doesn&apos;t use the schema import, the import schema declaration could just be deleted without affecting the test.
it would be good to keep qname-cast-1 (without the schema import) in the minimal conformance section as it is a direct test of the outcome of bug #2678
(which is why xq2xsl and saxon currently fail it as they still follow the CR rule that only string literals could be cast to xs:QName)

qname-cast-2 on the other hand does make essential use of schema import since it uses a schema defined derived type. This should be in the optional section of the test suite.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10587</commentid>
    <comment_count>21</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2006-07-19 13:22:09 +0000</bug_when>
    <thetext>further comments on Constr-compattr-compname-9 

Firstly one of the expected result files Constr-compattr-compnamealt-9.xml can not be generated by XQuery at all as it is not namespace well formed, using an attribute atomic:aQName with an undeclared prefix. This expected result should be deleted (and removed from the catalogue).


If the schema import is changed to a namespace declaration declaring the namespace for atomic: then an error XQDY0074 will be generated on an undeclared prefix.
the test can proceed if instead of the schema declaration the test has a namespace declaration for foo as http://www.example.com/foo and then the expected result is obtained (whether or not the system is schema-aware).

David</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10625</commentid>
    <comment_count>22</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2006-07-19 22:25:24 +0000</bug_when>
    <thetext>(In reply to comment #14)
&gt; (In reply to comment #13)
&gt; In addition to the list in comment #13, LocalNameFromQNameFunc001.xq and all
&gt; its siblings also have this problem, as originally mentioned in comment #0
&gt; (LocalNameFromQNameFunc00x no longer uses schema import, so my test harness
&gt; just &quot;fails&quot; this without flagging it as a possible PSVI problem, hence these
&gt; were not listed in the list on comment #13)
&gt; 
&gt; David
&gt; 
 NamespaceURIFromQNameFunc001 and siblings similarly still have schema dependencies (but no longer have explict schema import which is why they are listed in comment #2 but not comment #13)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10647</commentid>
    <comment_count>23</comment_count>
    <who name="Jinghao Liu">jinghaol</who>
    <bug_when>2006-07-22 01:49:00 +0000</bug_when>
    <thetext>I checked the change into old cvs place.  Sorry.

This time I moved all following tests under Optional Features:

ForExprType010
ForExprType025
ForExprType026
ForExprType027
ForExprType038
ForExprType039
ForExprType040
ForExprType041
ForExprType042
ForExprType043
ForExprType044
ForExprType049
ForExprType050
ForExprType051
ForExprType052
ForExprType053
LocalNameFromQNameFunc001
LocalNameFromQNameFunc002
LocalNameFromQNameFunc003
LocalNameFromQNameFunc004
LocalNameFromQNameFunc018
LocalNameFromQNameFunc019
LocalNameFromQNameFunc020
NamespaceURIFromQNameFunc001
NamespaceURIFromQNameFunc002
NamespaceURIFromQNameFunc003
NamespaceURIFromQNameFunc004
NamespaceURIFromQNameFunc018
NamespaceURIFromQNameFunc019
NamespaceURIFromQNameFunc020
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>