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

Re: Re: Identity Transform with special grouping

Subject: Re: Re: Identity Transform with special grouping
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Sat, 05 Feb 2011 15:20:06 +0100
Re:  Re: Identity Transform with special grouping
Senthilukvelaan wrote:
"sections" element is not showing up in my output. I do not know , how
could I include that in my xslt.

Sorry, I did not notice.
You need to write a template for the parent element of "section" elements then e.g.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:param name="n" select="2"/>

<xsl:output method="xml" omit-xml-declaration="yes"  indent="yes"
encoding="UTF-8" />
<xsl:strip-space elements="*"/>

<xsl:template match="node() | @*">
    <xsl:apply-templates select="node()| @*"/>

<xsl:template match="*[section]">
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="section[1]/preceding-sibling::node()"/>
<xsl:apply-templates select="section[position() &lt; $n]"/>
<xsl:apply-templates select="section[last()]/following-sibling::node()"/>



	Martin Honnen

Current Thread


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.
First Name
Last Name
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.