Subject: Re: [xsl] New XSL user seeking assistance! From: "Joris Gillis" <roac@xxxxxxxxxx> Date: Tue, 05 Jul 2005 15:07:41 +0200 |
There is no limit to how deep the nesting can be, but only certain types need to be merged (eg. in this case, only 'indent' elements). Elements such as 'font' and 'colour' simply override any previous elements of the same type so are not a problem. Obviously, nodes of the same type need only be merged when they are immediate descendants of each other, as opposed to having text between.
<xsl:template match="node() | @*"> <xsl:copy> <xsl:apply-templates select="node() | @*"/> </xsl:copy> </xsl:template>
<xsl:template match="indent[node()[1][self::indent]]"> <indent x="{@x + indent/@x}" y="{@y + indent/@y}"> <xsl:apply-templates select="*/node()"/> </indent> </xsl:template>
regards, -- Joris Gillis (http://users.telenet.be/root-jg/me.html) Spread the wiki (http://www.wikipedia.org)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] New XSL user seeking assistan, Matt Sims | Thread | Re: [xsl] New XSL user seeking assi, Matt Sims |
RE: [xsl] Unable to use the functio, Michael Kay | Date | Re: [xsl] New XSL user seeking assi, Matt Sims |
Month |