[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Re: Grouping by attribute
Great idea. However better than mine. I have just changed the if to choose like this: <xsl:template match="node()"> <xsl:param name="cn" select="/.."/> <xsl:choose> <xsl:when test="descendant-or-self::node() intersect $cn"> <xsl:copy> <xsl:apply-templates select="@*| node()"> <xsl:with-param name="cn" select="$cn"/> </xsl:apply-templates> </xsl:copy> </xsl:when> <xsl:otherwise> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:otherwise> </xsl:choose> </xsl:template> --- On Wed, 10/21/09, Martin Honnen <Martin.Honnen@xxxxxx> wrote: > <xsl:template match="node()" mode="m1"> > <xsl:param name="cn"/> > <xsl:if test="descendant-or-self::node() > intersect $cn"> > <xsl:copy> > <xsl:apply-templates > select="@*"/> > <xsl:apply-templates > select="node()" mode="m1"> > <xsl:with-param > name="cn" select="$cn"/> > </xsl:apply-templates> > </xsl:copy> > </xsl:if> > </xsl:template>
|
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
|