xsl-list
[Top] [All Lists]

RE: [xsl] Grouping simple flat structure

2008-03-17 07:58:37
Thank you Andrew. I was not aware of the sibling recursion template. 
As I was already using the basic identity transform template, I replaced it
with the modified version, but now some elements are not being copied to the
output. Should it be possible to swap these two templates without re-working
other templates? 

Ian


You can use the "sibling-recursion" template (also known as the
"modified identity tempate") which walks the sibling axis one node at
time:

   <xsl:template match="@* | node()">
      <xsl:copy>
         <xsl:apply-templates select="@*"/>
         <xsl:apply-templates select="node()[1]"/>
      </xsl:copy>
      <xsl:apply-templates select="following-sibling::node()[1]"/>
   </xsl:template>



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>