[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Select elements between others
Hi, > I want to turn this into a more normal form to make it easier > to manage: It's usually easier to help people if they show us what they have so far; your's is a grouping problem, see <http://www.jenitennison.com/xslt/grouping/>. <xsl:template match="data"> <xsl:copy> <xsl:apply-templates select="block"/> </xsl:copy> </xsl:template> <xsl:template match="block"> <xsl:copy> <xsl:apply-templates select="following-sibling::*[1]" mode="group"/> </xsl:copy> </xsl:template> <xsl:template match="item" mode="group"> <xsl:copy> <xsl:apply-templates select="@* | node()"/> </xsl:copy> <xsl:apply-templates select="following-sibling::*[1]" mode="group"/> </xsl:template> <xsl:template match="*" mode="group"/> <xsl:template match="@* | node()"> <xsl:copy> <xsl:apply-templates select="@* | node()"/> </xsl:copy> </xsl:template> Cheers, Jarno - Wumpscut: Mother (Maternal Instinct) XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|