<?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>21868</bug_id>
          
          <creation_ts>2013-04-29 17:55:01 +0000</creation_ts>
          <short_desc>&quot;serialization-matches&quot; test cases not accounting for the latest XQuery spec.</short_desc>
          <delta_ts>2013-06-04 16:21:24 +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>XQuery 3 &amp; XPath 3 Test Suite</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</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>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sorin Nasoi">spungi</reporter>
          <assigned_to name="O&apos;Neil Delpratt">oneil</assigned_to>
          <cc>andrew.eisenberg</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>86949</commentid>
    <comment_count>0</comment_count>
    <who name="Sorin Nasoi">spungi</who>
    <bug_when>2013-04-29 17:55:01 +0000</bug_when>
    <thetext>Test-cases 
&quot;Serialization-026,Serialization-027,Serialization-028,Serialization-029,Serialization-030&quot;
from &quot;prod-OptionDecl.serialization&quot; test-set assume an XQuery implementation MUST support serialization parameters specified in the query prolog.

According to the 
http://www.w3.org/TR/xquery-30/#id-serialization
spec:

&quot;If an XQuery implementation provides a serialization interface, it may support (and may expose to users) any of the serialization parameters listed (with default values) in C.1 Static Context Components. If an implementation does not support one of these parameters, it must ignore it without raising an error.&quot;
[...]
&quot;Processors may also allow external mechanisms for specifying serialization parameters, which may or may not override serialization parameters specified in the query prolog.&quot;

The test cases should be updated to reflect the latest version of the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87170</commentid>
    <comment_count>1</comment_count>
    <who name="O&apos;Neil Delpratt">oneil</who>
    <bug_when>2013-05-02 14:35:46 +0000</bug_when>
    <thetext>Probably the approach to take is to have two variants of the test case:

*one where where we add the dependency expecting the support of serialization parameters, i.e. satisfied=true.

* The other where were the dependency on the serialization parameters is not available, i.e. satisfied=false

If you agree, I will make the change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87185</commentid>
    <comment_count>2</comment_count>
    <who name="Sorin Nasoi">spungi</who>
    <bug_when>2013-05-02 19:36:59 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Probably the approach to take is to have two variants of the test case:
&gt; 
&gt; *one where where we add the dependency expecting the support of
&gt; serialization parameters, i.e. satisfied=true.
&gt; 
&gt; * The other where were the dependency on the serialization parameters is not
&gt; available, i.e. satisfied=false
&gt; 
&gt; If you agree, I will make the change.
Agree but first I think one has to create a new dependency in FOTS for the serialization parameters specified in prolog, right?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87496</commentid>
    <comment_count>3</comment_count>
    <who name="Sorin Nasoi">spungi</who>
    <bug_when>2013-05-09 15:51:32 +0000</bug_when>
    <thetext>Please note that same reported problem applies to 23 of the new test-cases added in the test-set &quot;misc-Serialization&quot; that were created by Henry Zongaro:

Here are the 23 test-case names:

&quot;Serialization-html-1&quot;, &quot;Serialization-html-2&quot;, &quot;Serialization-html-3&quot;, &quot;Serialization-html-4&quot;, &quot;Serialization-html-18&quot;, &quot;Serialization-html-19a&quot;, &quot;Serialization-html-19b&quot;, &quot;Serialization-html-19c&quot;, &quot;Serialization-html-22&quot;, &quot;Serialization-html-25&quot;, &quot;Serialization-html-26&quot;, &quot;Serialization-html-27, &quot;Serialization-html-28&quot;, &quot;Serialization-html-29&quot;, &quot;Serialization-html-30&quot;, &quot;Serialization-html-33&quot;, &quot;Serialization-html-34&quot;, &quot;Serialization-html-35&quot;, &quot;Serialization-html-36&quot;, &quot;Serialization-html-37&quot;, &quot;Serialization-html-38&quot;, &quot;Serialization-html-39&quot;, &quot;Serialization-html-40&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88438</commentid>
    <comment_count>4</comment_count>
    <who name="O&apos;Neil Delpratt">oneil</who>
    <bug_when>2013-05-30 10:52:17 +0000</bug_when>
    <thetext>Bug now fixed according to comment #1 and committed to cvs. 

Just to confirm I have added a new feature dependency (see below) for all the serialization tests specified:
&lt;dependency type=&quot;feature&quot; value=&quot;serialization&quot; satisfied=&quot;true&quot;/&gt;

This means that vendors will need to add this new dependency feature in their respective test drivers.

I have added test variants for Serialization-026,Serialization-027, ideally for implementers who cannot support serialization; here the serialization feature is set satisfied=&quot;false&quot;. I have Given them the name Serialization-026a,Serialization-027a, respectively. Please check that the assertions are ok?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88472</commentid>
    <comment_count>5</comment_count>
    <who name="Sorin Nasoi">spungi</who>
    <bug_when>2013-05-30 21:58:26 +0000</bug_when>
    <thetext>The following test-cases from &quot;prod-OptionDecl.serialization&quot; test-set need to be added the &lt;dependency type=&quot;feature&quot; value=&quot;serialization&quot; satisfied=&quot;true&quot;/&gt;:

- &quot;Serialization-004&quot;, &quot;Serialization-005&quot;, &quot;Serialization-031&quot;, &quot;Serialization-032&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88562</commentid>
    <comment_count>6</comment_count>
    <who name="O&apos;Neil Delpratt">oneil</who>
    <bug_when>2013-06-03 08:37:45 +0000</bug_when>
    <thetext>(In reply to comment #5) 
&gt; - &quot;Serialization-004&quot;, &quot;Serialization-005&quot;, &quot;Serialization-031&quot;,
&gt; &quot;Serialization-032&quot;

Dependency added to the tests as suggested</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88583</commentid>
    <comment_count>7</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2013-06-03 19:58:36 +0000</bug_when>
    <thetext>Test Serialization-026a assumes that the serialization feature is not supported.

         declare namespace output = &quot;http://www.w3.org/2010/xslt-xquery-serialization&quot;;
         declare option output:method &quot;xml&quot;;
         declare option output:standalone &quot;yes&quot;;
		 (&lt;a/&gt;,&lt;b/&gt;)


It expects &quot;&lt;a/&gt; &lt;b/&gt;&quot;. I believe that &quot;&lt;a/&gt;&lt;b/&gt;&quot; is the value that should be expected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88607</commentid>
    <comment_count>8</comment_count>
    <who name="O&apos;Neil Delpratt">oneil</who>
    <bug_when>2013-06-04 09:40:49 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; It expects &quot;&lt;a/&gt; &lt;b/&gt;&quot;. I believe that &quot;&lt;a/&gt;&lt;b/&gt;&quot; is the value that should
&gt; be expected.

Thanks Andrew. Fixed applied.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88616</commentid>
    <comment_count>9</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2013-06-04 14:23:43 +0000</bug_when>
    <thetext>I&apos;m looking more closely at Serialization-026a:

      &lt;result&gt;
           &lt;assert-string-value&gt;&lt;![CDATA[&lt;a/&gt;&lt;b/&gt;]]&gt;&lt;/assert-string-value&gt;
      &lt;/result&gt;

assert-string-value applies this expression to the result:

      string-join(for $r in $result return string($r), &quot; &quot;)

This generates a result of &quot; &quot; for the query (&lt;a/&gt;,&lt;b/&gt;).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88617</commentid>
    <comment_count>10</comment_count>
    <who name="O&apos;Neil Delpratt">oneil</who>
    <bug_when>2013-06-04 14:33:18 +0000</bug_when>
    <thetext>I am not sure how best to resolve this one. We cannot use &lt;assert/&gt; or &lt;assert-xml/&gt; because the output is not a valid XML document. Any suggestions?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88628</commentid>
    <comment_count>11</comment_count>
    <who name="O&apos;Neil Delpratt">oneil</who>
    <bug_when>2013-06-04 16:21:24 +0000</bug_when>
    <thetext>AS discussed in the WG telecon. My suggestion was agreed with to add a enclosing element in the query. This means that we can now use assert-xml for the expected output. 

The new test-case is as follows:

   &lt;test-case name=&quot;Serialization-026a&quot;&gt;
     ...
      &lt;dependency type=&quot;feature&quot; value=&quot;serialization&quot; satisfied=&quot;false&quot;/&gt;
      &lt;test&gt;&lt;![CDATA[
         declare namespace output = &quot;http://www.w3.org/2010/xslt-xquery-serialization&quot;;
         declare option output:method &quot;xml&quot;;
         declare option output:standalone &quot;yes&quot;;
		 &lt;out&gt;{(&lt;a/&gt;,&lt;b/&gt;)}&lt;/out&gt;
      ]]&gt;&lt;/test&gt;
      &lt;result&gt;
           &lt;assert-xml&gt;&lt;![CDATA[&lt;out&gt;&lt;a/&gt;&lt;b/&gt;&lt;/out&gt;]]&gt;&lt;/assert-xml&gt;
      &lt;/result&gt;
   &lt;/test-case&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>