<?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>3635</bug_id>
          
          <creation_ts>2006-08-26 21:28:46 +0000</creation_ts>
          <short_desc>prolog-version-2</short_desc>
          <delta_ts>2006-09-01 07:32:00 +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>Windows XP</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="Michael Kay">mike</reporter>
          <assigned_to name="Carmelo Montanez">carmelo</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>11293</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-08-26 21:28:46 +0000</bug_when>
    <thetext>The query file prolog-version-2.xq has an encoding declaration asserting that it is encoded in UTF-16 - but it isn&apos;t.

The handling of an incorrect encoding declaration is entirely implementation-dependent. In this case it appears that Saxon on the Java platform recovers from the error, but on the .NET platform it falls over with a random syntax error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11306</commentid>
    <comment_count>1</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2006-08-29 19:13:39 +0000</bug_when>
    <thetext>I agree that the query should be UTF-16 encoded to match the declaration in the prolog.

In section 4.1, Version Declaration, XQuery says, &quot;The handling of an encoding declaration is implementation-dependent.&quot;

We don&apos;t specify an error in this clause, other than XQST0031, which is concerned only with the name of the encoding. I think that this test case should accept a parse error, XPST0003, from implementations that don&apos;t support UTF-16 queries.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11308</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-08-29 19:24:17 +0000</bug_when>
    <thetext>There&apos;s a reason that we don&apos;t specify an error code, namely that we recognize that the error might be detected not by the query processor, but by some low-level software perhaps in the operating system, which might be difficult for the query processor to trap and interpret. It might even result in the query processor parsing and executing a different query from the one intended! So I don&apos;t think this case belongs in the test suite, since the outcome is so unpredictable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11341</commentid>
    <comment_count>3</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-08-31 17:30:32 +0000</bug_when>
    <thetext>I sort of agree with Michael on this one.   Perhaps the test does needs to be removed.  Any thoughts?

Carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11342</commentid>
    <comment_count>4</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2006-08-31 17:38:57 +0000</bug_when>
    <thetext>Accepting XPST0003 would only make the test pass for implementations that issue XPST0003(since it&apos;s implementation defined, no one is required to issue XPST0003).

I think it is important to have tests that are in the UTF-16 encoding, so I believe the correct resolution is to keep the test and keep &apos;xquery version &quot;1.0&quot; encoding &quot;utf-16&quot;;&apos;, but to convert the file to actually be in UTF-16 encoding.


Frans</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11343</commentid>
    <comment_count>5</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-08-31 17:45:59 +0000</bug_when>
    <thetext>Frans:

Thanks.  I can be persuaded either way.  Do you know of any UTF-16 conversion tools?

carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11344</commentid>
    <comment_count>6</comment_count>
    <who name="Carmelo Montanez">carmelo</who>
    <bug_when>2006-08-31 18:35:39 +0000</bug_when>
    <thetext>Frans:

Never mind, I found a way to reformat the file.  Submitted new file
on UTF-16 format.

Thanks.

carmelo</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11346</commentid>
    <comment_count>7</comment_count>
    <who name="David Carlisle">davidc</who>
    <bug_when>2006-08-31 20:54:49 +0000</bug_when>
    <thetext>I think the catalog ought to flag the encoding of the file (anywhere, eg encoding=&quot;utf-16&quot; in the query element). A system might be able to read in utf16 (and check the encoding specified) if it is given warning of the encoding. It needn&apos;t be ableto be auto detect the encoding from the prplog (eg the guidelines give examples saying teh query may be embedded in a host language, eg sql in which case the encoding of the file would necessarily be determined by the host language parser.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11349</commentid>
    <comment_count>8</comment_count>
    <who name="Tom Brosens">Tom.Brosens</who>
    <bug_when>2006-09-01 07:32:00 +0000</bug_when>
    <thetext>That&apos;s +1 for David&apos;s solution. Although we could auto-detect the encoding it would be a lot easier if the encoding is in the catalog for query files which are not UTF-8 encoded.

Thanks,
Tom.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>