<?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>22740</bug_id>
          
          <creation_ts>2013-07-20 15:00:42 +0000</creation_ts>
          <short_desc>xsl:fork example doesn&apos;t produce the described results</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>Member-only Editors Drafts</version>
          <rep_platform>All</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>trivial</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Abel Braaksma">abel.braaksma</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>91038</commentid>
    <comment_count>0</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2013-07-20 15:00:42 +0000</bug_when>
    <thetext>The description for the second example under xsl:fork:

&quot;The requirement is to output a copy of the input document in which (a) the note elements have been removed,...&quot; 

does not fit the code provided:

&lt;xsl:mode on-no-match=&quot;deep-copy&quot; streamable=&quot;yes&quot;/&gt;

&lt;xsl:template match=&quot;note&quot;/&gt;

&lt;xsl:template match=&quot;/*&quot;&gt;
  &lt;xsl:fork&gt;
    &lt;xsl:sequence&gt;
      &lt;xsl:apply-templates/&gt;
    &lt;/xsl:sequence&gt;
    &lt;xsl:sequence&gt;
      &lt;footnote&gt;
        &lt;p&gt;Removed &lt;xsl:value-of select=&quot;count(.//note)&quot;/&gt; 
                 note elements.&lt;/p&gt;
      &lt;/footnote&gt;
    &lt;/xsl:sequence&gt;  
  &lt;/xsl:fork&gt;
&lt;/xsl:template&gt;

The example uses deep-copy, which prevents processing of any children below /*/*, which means that nested note-elements will be part of the output. To remove the note elements and to keep anything else, the line 

&lt;xsl:mode on-no-match=&quot;deep-copy&quot; streamable=&quot;yes&quot;/&gt;

should be changed into

&lt;xsl:mode on-no-match=&quot;shallow-copy&quot; streamable=&quot;yes&quot;/&gt;

Abel


PS: this error is similar to https://www.w3.org/Bugs/Public/show_bug.cgi?id=22123, but that was in another example.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91040</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2013-07-20 15:54:53 +0000</bug_when>
    <thetext>Thanks, fixed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>