<?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>3310</bug_id>
          
          <creation_ts>2006-06-05 11:36:34 +0000</creation_ts>
          <short_desc>&quot;x&quot; castable as xs:QName</short_desc>
          <delta_ts>2006-06-06 21:44:34 +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>XPath 2.0</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</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="Michael Kay">mike</reporter>
          <assigned_to name="Don Chamberlin">chamberl</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>9932</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-06-05 11:36:34 +0000</bug_when>
    <thetext>For casting a string to a QName, we have a special rule that the string must be written as a string literal. It&apos;s not clear how this rule affects the &quot;castable&quot; expression. As written, V castable as xs:QName is true if the *value* V can be cast to a QName; the spec says nothing about the result depending on the way in which V is written.

The &quot;least surprise&quot; option is probably to say that V castable as xs:QName (when V is a string) can succeed only if V is written as a string literal.

Michael Kay</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9934</commentid>
    <comment_count>1</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2006-06-05 13:55:45 +0000</bug_when>
    <thetext>Considering the new wording in:

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2678

more specifically:

&quot;It is also permitted for these constructors and casts to take a dynamically-supplied argument in the normal way, but as the casting table (see section 17) indicates, the only arguments that are supported in this case are values of type xs:QName or xs:NOTATION respectively.&quot;

it makes me wonder what&apos;s the least surprise here, since casting a xs:QName would also be valid, as I see it.

Since the texts in this area deals with the casting on a sometimes grammatical level, one should perhaps watch out such that the empty sequence doesn&apos;t get disallowed. E.g, the texts should gracefully handle &quot;() castable as xs:QName?&quot; and &quot;() cast as xs:QName?&quot;, in the appropriate way.


Frans</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9950</commentid>
    <comment_count>2</comment_count>
    <who name="Don Chamberlin">chamberl</who>
    <bug_when>2006-06-06 21:44:15 +0000</bug_when>
    <thetext>Mike,
The Query and XSLT working groups discussed your issue on June 6, 2006, and agreed to add the following Note to the section on the &quot;castable&quot; expression:

If the target type is QName or NOTATION or derived from one of these, and
the input argument is of type xs:string but it is not a literal string,
the value of the &quot;castable&quot; expression is False.

Since you were present during the discussion of this issue, I am marking this Bugzilla entry as Fixed and Closed.

Regards,
Don Chamberlin</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>