<?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>21910</bug_id>
          
          <creation_ts>2013-05-02 15:56:26 +0000</creation_ts>
          <short_desc>[XT3TS] Many tests on XSLT 3.0 have xsl version 2.0 in the xsl:transform/stylesheet instruction</short_desc>
          <delta_ts>2015-05-06 21:23:40 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XSLT 3.0 Test Suite</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://plam.cantech.bg</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="Abel Braaksma">abel.braaksma</reporter>
          <assigned_to name="Abel Braaksma">abel.online</assigned_to>
          <cc>mike</cc>
    
    <cc>plam</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>87177</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2013-05-02 15:56:26 +0000</bug_when>
    <thetext>As in the title. Examples include evaluate-004.xsl, evaluate-005.xsl, evaluate-007.xsl, evaluate-024.xsl, output-0208.xsl - output-0229.xsl.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87180</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2013-05-02 16:53:46 +0000</bug_when>
    <thetext>I suspect that quite a few of them also specify version=&quot;2.1&quot;.

Note that a 3.0 processor should process a stylesheet specifying 2.0 or 2.1 without error, but we should still aim to correct this unless we are actually testing the backwards compatibility rules in the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119119</commentid>
    <comment_count>2</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-03-31 03:04:13 +0000</bug_when>
    <thetext>Query used:
   /(xsl:stylesheet|xsl:transform)/@version
   [not(normalize-space(.) = (&apos;1.0&apos;, &apos;2.0&apos;, &apos;3.0&apos;))]

I found 38 items with a version not in (1.0, 2.0, 3.0), of which 15 where in the version test-set, 4 in backwards, 4 in errors, 1 in use-when (all deliberate)

That leaves:
* 5 times 1.1 
  - bug-3102.xsl           -&gt; changed to 2.0
  - expression-0801.xsl    -&gt; changed to 2.0
  - expression-0802.xsl    -&gt; changed to 2.0
  - expression-0803.xsl    -&gt; changed to 2.0
  - axes-049.xsl           -&gt; changed to 1.0

* 1 time 20
  - key-050.xsl            -&gt; changed to 1.0

* 8 times 2.1
  - streamable-065.xsl     -&gt; changed to 3.0
  - streamable-118.xsl     -&gt; changed to 3.0
  - streamable-121.xsl     -&gt; changed to 3.0
  - streamable-122.xsl     -&gt; changed to 3.0
  - streamable-123.xsl     -&gt; changed to 3.0
  - streamable-125.xsl     -&gt; changed to 3.0
  - streamable-128.xsl     -&gt; changed to 3.0

Next query used (1.0):
   /cat:test-set/cat:test-case
   [cat:dependencies/cat:spec/@value[contains(., &apos;XSLT10&apos;)]]
   /cat:test/cat:stylesheet
   /doc(@file)/(xsl:stylesheet|xsl:transform)
   /@version[normalize-space(.) != &apos;1.0&apos;]

Resulting 1703, of which only 8 items where deliberately wrong, and the 1630 others had version 2.0.

Next query used (2.0):
   /cat:test-set/cat:test-case
   [cat:dependencies/cat:spec/@value[contains(., &apos;XSLT20&apos;)]]
   /cat:test/cat:stylesheet
   /doc(@file)/(xsl:stylesheet|xsl:transform)
   /@version[normalize-space(.) != &apos;2.0&apos;]

Resulting in 111 items of which roughly half seems to be in error (1.0 where 2.0 is expected because not testing backwards compatibility or 1.0 behavior)

Next query used (3.0):
   /cat:test-set/cat:test-case
   [cat:dependencies/cat:spec/@value = &apos;XSLT30+&apos;]
   /cat:test/cat:stylesheet
   /doc(@file)/(xsl:stylesheet|xsl:transform)
   /@version[normalize-space(.) != &apos;3.0&apos;]

Result is 80 items, with at least 2 of them deliberate.

I have at this moment only fixed the 14 items mentioned in the beginning that were seriously wrong (though I doubt it influences any test results). Still thinking about fixing the others and whether or not that is actually a good idea.

I am uncertain about the many 1.0 tests that have version 2.0, because they may have been changed deliberately in this way, to allow them as 2.0 tests without them behaving in XPath 1.0 compatibility mode. When run with XSLT 1.0, and if no 2.0 features are used, this should not hamper anyone using the test suite to test an XSLT 1.0 processor.

I think it does make sense to align the other tests. These are not too many.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119124</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-03-31 08:09:10 +0000</bug_when>
    <thetext>&lt;quote&gt;
Next query used (1.0):
  /cat:test-set/cat:test-case
  [cat:dependencies/cat:spec/@value[contains(., &apos;XSLT10&apos;)]]
  /cat:test/cat:stylesheet
  /doc(@file)/(xsl:stylesheet|xsl:transform)
  /@version[normalize-space(.) != &apos;1.0&apos;]

Resulting 1703, of which only 8 items where deliberately wrong, and the 1630
others had version 2.0.
&lt;/quote&gt;

Surely any test that&apos;s intended to be used under 1.0 and 2.0 but not 3.0 will have a dependency that contains &quot;XSLT10&quot;, and most such tests will say version=&quot;2.0&quot; because they were originally written as part of the 2.0 test suite development. They should be left alone. On the other hand, if you changed the predicate to [contains(., &apos;XSLT10&apos;) and not(contains(., &apos;XSLT20&apos;)]] that would indicate a problem.

Actually I&apos;m not sure anyone has seriously run this test suite with a 1.0 processor to check this metadata. When they do, they can take responsibility fixing it. Our primary purpose is tests for 3.0 processors, anything else is a spin-off and a bonus.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119271</commentid>
    <comment_count>4</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-04-07 03:13:30 +0000</bug_when>
    <thetext>&gt; Our primary purpose is tests for 3.0 processors

Yes, I agree. I was just trying to be complete. 

&gt; They should be left alone. On the other hand, if you changed the predicate to 
&gt; [contains(., &apos;XSLT10&apos;) and not(contains(., &apos;XSLT20&apos;)]] that would indicate a 
&gt; problem.

Tried it, result: 1696 items. I would assume these have been moved from the 1.0 testsuite and have been given a version number of 2.0, but the spec-support number remained 1.0.

Since 2.0 processors may behave differently in BC mode, and because of your comment on the focus on 3.0, I will leave these tests alone (I wouldn&apos;t even know where to begin).

----------

About 3.0 tests. I made a wrong assumption: some tests have been mirrored for 3.0 and 2.0 because of differences in test results. It would be wrong for those mirrored tests to maintain two identical files with only a version difference.

If I change the query as follows, the result is only 32 tests:

    /cat:test-set/cat:test-case
    [cat:dependencies/cat:spec/@value = &apos;XSLT30+&apos;]
    /cat:test/cat:stylesheet
    [let $f := @file return 
    count(
       /cat:test-set/cat:test-case
       [cat:dependencies/cat:spec/@value != &apos;XSLT30+&apos;]
       /cat:test/cat:stylesheet[@file = $f]) =0]
    /doc(@file)/(xsl:stylesheet|xsl:transform)
    /@version[normalize-space(.) != &apos;3.0&apos;]

I have fixed those tests. It is possible that some of these may also work for XSLT20, I didn&apos;t check extensively whether all these tests only use 3.0 features.

--------

About 2.0 tests:

&gt; Resulting in 111 items of which roughly half seems to be in error (1.0 where
&gt; 2.0 is expected because not testing backwards compatibility or 1.0 behavior)

I am less confident in changing these, so unless issues come up, I will leave them for now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120204</commentid>
    <comment_count>5</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2015-05-06 21:23:40 +0000</bug_when>
    <thetext>Was resolved &gt; 30 days ago, closing.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>