[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Grouping simple flat structure

Subject: RE: Grouping simple flat structure
From: "Ian Proudfoot" <ian.proudfoot@xxxxxxxxxxx>
Date: Mon, 17 Mar 2008 14:58:05 -0000
RE:  Grouping simple flat structure
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>

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.