Subject: RE: [xsl] Select elements between others From: "Joe Fawcett" <joefawcett@xxxxxxxxxxx> Date: Tue, 20 Jan 2004 10:41:39 +0000 |
From: Jarno.Elovirta@xxxxxxxxx Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: RE: [xsl] Select elements between others Date: Tue, 20 Jan 2004 12:18:38 +0200
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Select elements between o, Jarno . Elovirta | Thread | Re: [xsl] Select elements between o, Dimitre Novatchev |
Re: [xsl] Select elements between o, George Cristian Bina | Date | Re: [xsl] Get path of xsl template, Mark Williams |
Month |