<?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>6238</bug_id>
          
          <creation_ts>2008-11-19 17:09:45 +0000</creation_ts>
          <short_desc>CVS: K2-NameTest-22</short_desc>
          <delta_ts>2010-03-16 14:38:46 +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>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</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="Tim Mills">tim</reporter>
          <assigned_to name="Frans Englich">frans.englich</assigned_to>
          <cc>andrew.eisenberg</cc>
    
    <cc>frans.englich</cc>
    
    <cc>oliver</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>22474</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2008-11-19 17:09:45 +0000</bug_when>
    <thetext>This query, which tests the resolution of Bug 5351, incorrectly expects an error.

Quoting Bug 5351:

&quot;The name test shown in this bug report will always result in a dynamic error. 
In its teleconference on 2008-01-08, the WG decided (because the error, caused
by a string literal, can be caught statically) to make it a type error
(XPTY0004) if the string literal of a PI name test cannot be converted to an
NCName.&quot;

Here, the string literal can be converted to a valid NCName using the constructor xs:NCName(&apos;b &apos;).


(:*******************************************************:)
(: Test: K2-NameTest-22                                  :)
(: Written by: Frans Englich                             :)
(: Date: 2007-11-22T11:31:21+01:00                       :)
(: Purpose: A processing-instruction() with an invalid NCName in a string litera
l. :)
(:*******************************************************:)
empty(let $e := &lt;a b =&quot;content&quot;&gt;&lt;?b asd?&gt;&lt;b/&gt;&lt;/a&gt;
              return $e/processing-instruction(&quot;b &quot;))</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22552</commentid>
    <comment_count>1</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2008-11-28 09:23:36 +0000</bug_when>
    <thetext>Could we back this up with spec references? I fail to find some piece of text which says &quot;The string literal appearing inside the node test processing-instruction() is treated as passed to the xs:NCName constructor function.&quot; A piece of functionality that raise XPTY0004, doesn&apos;t equal that the code uses casting, as far as I know.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22554</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2008-11-28 09:48:55 +0000</bug_when>
    <thetext>I quoted the resolution of the bug.  I&apos;m not sure whether this has made it into the erratum yet.  I&apos;ve requested clarification under Bug 5351.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24286</commentid>
    <comment_count>3</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2009-03-16 20:06:19 +0000</bug_when>
    <thetext>The resolution of Bug #5351 is reflected in erratum XQ.E12 (http://www.w3.org/XML/2007/qt-errata/xquery-errata.html#E12). This erratum adds the following text in 2.5.4.2 Matching an ItemType and an Item:

&quot;If the specified PITarget is not a syntactically valid NCName, a type error is raised [err:XPTY0004].&quot;


The WGs also resolved Bug #6559 recently, saying:

&quot;We will check the target to make sure it is a valid NCName. Whitespace is
allowed, we use whitespace normalization before testing.&quot;

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28295</commentid>
    <comment_count>4</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2009-10-13 13:11:27 +0000</bug_when>
    <thetext>A fix has been attempted in CVS. Test expects output now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28315</commentid>
    <comment_count>5</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2009-10-13 15:58:34 +0000</bug_when>
    <thetext>The expected result appears to be:

&quot;&lt;doc&gt;false&lt;/doc&gt;&quot;

but should be:

&quot;&lt;doc&gt;true&lt;/doc&gt;&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28339</commentid>
    <comment_count>6</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2009-10-14 13:24:43 +0000</bug_when>
    <thetext>Right, new fix attempted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28344</commentid>
    <comment_count>7</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2009-10-14 14:18:14 +0000</bug_when>
    <thetext>Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30189</commentid>
    <comment_count>8</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2009-12-17 12:23:10 +0000</bug_when>
    <thetext>I made a mistake in Comment #5.

The expected result of this test should be false, because the query is equivalent to

empty(let $e := &lt;a b =&quot;content&quot;&gt;&lt;?b asd?&gt;&lt;b/&gt;&lt;/a&gt;
              return $e/processing-instruction(&quot;b&quot;))
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33590</commentid>
    <comment_count>9</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2010-03-15 12:38:13 +0000</bug_when>
    <thetext>Agreed, baseline is false in CVS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33616</commentid>
    <comment_count>10</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2010-03-16 14:38:46 +0000</bug_when>
    <thetext>Thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>