<?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>9916</bug_id>
          
          <creation_ts>2010-06-11 22:49:02 +0000</creation_ts>
          <short_desc>Allow patterns to access template parameters</short_desc>
          <delta_ts>2014-05-15 14:00:41 +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>WONTFIX</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="Evan Lenz">evan</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>36123</commentid>
    <comment_count>0</comment_count>
    <who name="Evan Lenz">evan</who>
    <bug_when>2010-06-11 22:49:02 +0000</bug_when>
    <thetext>It would be really useful if patterns could have access to template parameters.

The parameter would still have to be declared by the template for it to be visible (as with tunnel parameters). Also, when visible, it would shadow any global variables with the same name (just as with local variables/parameters).

For example:

&lt;xsl:template match=&quot;*[. is $node]&quot;&gt;
  &lt;xsl:param name=&quot;node&quot; tunnel=&quot;yes&quot;/&gt;
  &lt;found/&gt;
&lt;/xsl:template&gt;

&lt;xsl:template match=&quot;*&quot;&gt;
  &lt;not-found/&gt;
&lt;/xsl:template&gt;

Right now I have to use &lt;xsl:choose&gt; (yuck).

I can&apos;t think of any issues with this other than the somewhat unintuitive aspect of the parameter being declared just below where it&apos;s being referenced (as opposed to above).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36124</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-06-11 23:08:11 +0000</bug_when>
    <thetext>I&apos;m a little sceptical about the value of this (but open to persuasion).

One obvious complication is the effect on xsl:next-match and xsl:apply-imports.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36962</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-07-16 15:14:44 +0000</bug_when>
    <thetext>The WG looked at this with interest. But there was a general feeling that it would be too confusing.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>