<?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>3731</bug_id>
          
          <creation_ts>2006-09-15 13:55:27 +0000</creation_ts>
          <short_desc>version declaration after comment</short_desc>
          <delta_ts>2006-09-19 10:16:16 +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>1.0</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>INVALID</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="Per Bothner">per</reporter>
          <assigned_to name="Andrew Eisenberg">andrew.eisenberg</assigned_to>
          
          
          <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>11774</commentid>
    <comment_count>0</comment_count>
    <who name="Per Bothner">per</who>
    <bug_when>2006-09-15 13:55:27 +0000</bug_when>
    <thetext>version_declaration-001.xq is marked as &lt;expected-error&gt;*&lt;/expected-error&gt;.  Since I cannot see anything else wrong with the query, I&apos;m assuming this si because there is a comment before the version declaratiion.  This implies that an XQuery implementation is rquired to reject a version declaration that follows a comment. But the Specification [4.1] says:  &quot;If such a Comment [before the end of the version declaration] is present, the result is implementation-dependent.&quot; That to me seems to say that an implementation is *not* requiredto reject this query.

I guess I&apos;m asking for guidance here.  Does what does &lt;expected-error&gt;*&lt;/expected-error&gt; mean in this context?

The same applies to version_declaration-002, version_declaration-003, version_declaration-004, and version_declaration-005.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11775</commentid>
    <comment_count>1</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2006-09-15 14:03:50 +0000</bug_when>
    <thetext>Are you really sure about this? To me test version_declaration-001 has a text base line of &quot;1 2&quot;(same applies to the other tests). Therefore, the tests seems ok to me.

So, I&apos;m currently thinking about closing this report as invalid.

&lt;expected-error&gt;*&lt;/expected-error&gt; means that any error code is ok.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11776</commentid>
    <comment_count>2</comment_count>
    <who name="Per Bothner">per</who>
    <bug_when>2006-09-15 14:34:53 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Are you really sure about this?

No - that&apos;s why I&apos;m asking.

&gt; To me test version_declaration-001 has a text
&gt; base line of &quot;1 2&quot;(same applies to the other tests).

What is &quot;text base line&quot; and where is it defined?

&gt; &lt;expected-error&gt;*&lt;/expected-error&gt; means that any error code is ok.

But does it also mean that &quot;no* error code is ok?  If so, that should be clarified in &quot;Guidelines for Test Submission.html&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11779</commentid>
    <comment_count>3</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2006-09-15 16:13:22 +0000</bug_when>
    <thetext>Here&apos;s the XQTSCatalog.xml entry for version_declaration-001 in CVS(I believe the catalog in the 1.0 release is identical):

               &lt;test-case is-XPath2=&quot;false&quot; name=&quot;version_declaration-001&quot; FilePath=&quot;Expressions/PrologExpr/VersionProlog/&quot; scenario=&quot;standard&quot; Creator=&quot;Pulkita Tyagi&quot;&gt;
                  &lt;description&gt;Demonstrates version declaration,the version.&lt;/description&gt;
                  &lt;spec-citation spec=&quot;XQuery&quot; section-number=&quot;4.1&quot; section-title=&quot;Version Declaration&quot; section-pointer=&quot;id-version-declaration&quot;/&gt;
                  &lt;query name=&quot;version_declaration-001&quot; date=&quot;2005-10-05&quot;/&gt;
                  &lt;input-file role=&quot;principal-data&quot; variable=&quot;input-context&quot;&gt;emptydoc&lt;/input-file&gt;
                  &lt;output-file role=&quot;principal&quot; compare=&quot;Text&quot;&gt;version_declaration-001.txt&lt;/output-file&gt;
                  &lt;expected-error&gt;*&lt;/expected-error&gt;
               &lt;/test-case&gt;

Notice this line:

&lt;output-file role=&quot;principal&quot; compare=&quot;Text&quot;&gt;version_declaration-001.txt&lt;/output-file&gt;

This means there is a base line(something to compare the test result against) in file version_declaration-001.txt which should be compared with the Text method. Guidelines for Running the XML Query Test Suite says: &apos;Text: Same comparison as &quot;XML fragment&quot;.&apos;

Low level details of the XML format is documented in XQTSCatalog.xsd(although I agree it can be more extensive). See the global type QueryErrorCode.

So no, &apos;*&apos; does not mean no error code is acceptable, but that one error code that is any error code is acceptable.

Thanks for asking, I hope it helps.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11781</commentid>
    <comment_count>4</comment_count>
    <who name="Per Bothner">per</who>
    <bug_when>2006-09-15 16:44:28 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; So no, &apos;*&apos; does not mean no error code is acceptable, but that one error code
&gt; that is any error code is acceptable.

My point still remains: the XQuery Specification does not seem to require an error in this situation.  I would expect &quot;Implementation dependent&quot; to mean no diagnostic is required.  If my reading is current, then the testsuite should not require an error code here.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11782</commentid>
    <comment_count>5</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2006-09-15 17:00:42 +0000</bug_when>
    <thetext>Here&apos;s how I see it:

That particular baseline, the one which allows any error code, doesn&apos;t allow no error code. However, since there also is a text baseline, an implementation can pass the test by evaluating to a result that matches the text baseline. Multiple baselines means that an implementation can pass the test in anyway that a baseline allows.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11802</commentid>
    <comment_count>6</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2006-09-15 18:59:13 +0000</bug_when>
    <thetext>I believe that Frans&apos; statements have all been accurate. We expect an implementation to pass if it returns &quot;1 2&quot; or it returns any error.

This is, admittedly, a bit more restrictive than rules of the XQuery specification, which says:

&quot;If a version declaration is present, no Comment may occur before the end of the version declaration. If such a Comment is present, the result is implementation-dependent.&quot;

If an implementation returns &quot;2 3&quot; and wants to challenge this, then we would have to accept it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11811</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-09-17 07:39:12 +0000</bug_when>
    <thetext>&gt;If an implementation returns &quot;2 3&quot; and wants to challenge this, then we would
have to accept it.

And of course, if the comment has confused the implementation into decoding the query incorrectly, such a result is theoretically possible; so I think the spec should stay as it is.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11848</commentid>
    <comment_count>8</comment_count>
    <who name="Per Bothner">per</who>
    <bug_when>2006-09-19 06:40:44 +0000</bug_when>
    <thetext>Ok, I didn&apos;t realise that a test-case could have both output-file and expected-error as possible outcomes.

I now understand that a test-case have zero or more output-file non-error outcomes *and* zero or more expected-error outcomes, any of which might be valid.  That wasn&apos;t clear to me before.

Thanks for the responses.  I&apos;ve marked the report as &quot;invalid&quot;.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>