<?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>22127</bug_id>
          
          <creation_ts>2013-05-21 21:41:46 +0000</creation_ts>
          <short_desc>Allow xsl:next-match inside xsl:for-each</short_desc>
          <delta_ts>2014-05-15 14:00:45 +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>Windows NT</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>88025</commentid>
    <comment_count>0</comment_count>
    <who name="Evan Lenz">evan</who>
    <bug_when>2013-05-21 21:41:46 +0000</bug_when>
    <thetext>I&apos;ve tried this on a couple of occasions but was disappointed to see that it didn&apos;t work. I understand that the semantics need some defining, but from the user&apos;s perspective there&apos;s only one behavior that makes sense: run the next-match based on the node that was matched (which may not be the current node if inside xsl:for-each). Call it the &quot;currently matched node&quot; if necessary. I don&apos;t believe it would make sense to say &quot;next-match&quot; on any other node (such as the current node), because there would no longer be a comparison by which another match could be said to be &quot;next&quot;; my point here is that there&apos;s no ambiguity problem.

It can be useful for &quot;fanning out&quot; the matched node, where the first match does the fanning and the next match does the processing, all in the same mode. That it&apos;s a next match (in the same mode) rather than using a new mode is important because the first-matching template rule could be associated with more than one mode (to support multiple fanning scenarios, for example). Also, you may want to pass a different parameter for each &lt;xsl:for-each&gt; iteration.

My contention is that xsl:next-match (and xsl:apply-imports) should not be defined in terms of the current node but rather the currently matched node, thereby removing the restriction; and that &lt;xsl:for-each&gt; shouldn&apos;t nullify the current template rule.

Evan</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88032</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2013-05-21 22:30:41 +0000</bug_when>
    <thetext>I&apos;d like to see a compelling use case. 

My instincts are against adding more &quot;current this&quot; and &quot;current that&quot; values; even if scoped statically to a template rule, they add semantic complexity. For example, this facility would complicate the streamability rules. If we did introduce a &quot;current matched node&quot; I think we would need an interrogative function to return it. (In practice, I suspect this new function would then be used a lot more than the proposed xsl:next-match facility...)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91461</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2013-07-31 15:51:30 +0000</bug_when>
    <thetext>The WG reviewed this and decided that in the absence of a compelling use case the WG was inclined to make no change in this area.

Unless we have further input before 1 September we will close this with no action.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>