<?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>27012</bug_id>
          
          <creation_ts>2014-10-09 19:16:07 +0000</creation_ts>
          <short_desc>[xslt 3.0] xsl:context-item: apply conversion rules?</short_desc>
          <delta_ts>2014-10-24 10:52:39 +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>XSLT 3.0</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</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="Michael Kay">mike</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>112928</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2014-10-09 19:16:07 +0000</bug_when>
    <thetext>Section 10.1.1 (xsl:context-item) makes conflicting statements about whether or not the context item is converted to the required type.

First it says:

No attempt is made to convert the context item to the required type (using the function conversion rules or otherwise).

Later it says:

If a context item is supplied (which will automatically be the case if the template is invoked using xsl:apply-templates, xsl:apply-imports, or xsl:next-match) then it will be converted to the required type by applying the function conversion rules; a type error [see ERR XTTE0590] occurs if conversion to the required type is not possible.

Both designs are feasible, but I&apos;m inclined to go for the &quot;no conversion&quot; option to avoid complications. For example, if a template matches a node and then atomizes it for processing, what does xsl:next-match do?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113013</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2014-10-13 09:17:32 +0000</bug_when>
    <thetext>Note that xsl:global-context-item says unambiguously that the supplied item *is* converted to the required type. In this case I don&apos;t see the same complications arising, but on the other hand, there&apos;s no real need for conversion in practice, given that the declared global context item type will almost invariably be a node test, and if the required type is a node then no conversion happens anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113340</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2014-10-16 16:59:33 +0000</bug_when>
    <thetext>The WG decided that no conversion should occur for xsl:context-item but conversion should occur for xsl:global-context-item.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>