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

Re: start-stopping xml output

Subject: Re: start-stopping xml output
From: "Joris Gillis" <roac@xxxxxxxxxx>
Date: Thu, 22 Sep 2005 10:32:10 +0200
xsl apply xml output
Hi,

Tempore 10:20:15, die 09/22/2005 AD, hinc in xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit geoff hopkins <geoffhopkins123@xxxxxxxxx>:

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.

There are numerous ways to reach the goal you state, but one that seems to follow your pseudo-algorithm rather closely is this one:


<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>

</xsl:stylesheet>


regards, -- Joris Gillis (http://users.telenet.be/root-jg/me.html) B+Error, keyboard not foundb press F1 to continueB; , BIOS

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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