Subject: Re: [xsl] start-stopping xml output From: "Joris Gillis" <roac@xxxxxxxxxx> Date: Thu, 22 Sep 2005 10:32:10 +0200 |
when it finds A (start point) it moves onto the node and starts reading until it finds the next occurence of B (stop point). When it finds the next occurance of A it then follows the same rule stated above.
And so on...there could be one occurance of START/STOP points or multiple.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes"/> <xsl:template match="root"> <xsl:copy> <xsl:apply-templates select="item[1]"/> </xsl:copy> </xsl:template>
<xsl:template match="item"> <xsl:if test=".!='A'"> <xsl:copy-of select="."/> </xsl:if> <xsl:apply-templates select="following-sibling::item[1]"/> </xsl:template>
<xsl:template match="item[.='B']"> <xsl:apply-templates select="following-sibling::item[.='A'][1]"/> </xsl:template>
regards, -- Joris Gillis (http://users.telenet.be/root-jg/me.html) B+Error, keyboard not foundb press F1 to continueB; , BIOS
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] start-stopping xml output, geoff hopkins | Thread | Re: [xsl] start-stopping xml output, geoff hopkins |
[xsl] start-stopping xml output, geoff hopkins | Date | Re: [xsl] Wath is the opposite of t, David Carlisle |
Month |