|
Subject: [xsl] following nodes until "stop-node" reached (content between two nodes) From: "jakob Beetz" <mailinglists.jakob@xxxxxxxxx> Date: Tue, 8 Apr 2008 14:41:28 +0200 |
Dear XSLers,
given s.th. like
[...]
<somenode value="start">Heading</somenode>
<a/>
<b>text goes here </b>
<b>unpredictable</b>
<a>dasdf</a>
<somenode value="stop">something else</somenode>
[...]
how would I select anything (but not including) that is between
"somenode" with the attribute "start" and "stop"?
This is my beginers approach:
<xsl:template match="//somenode[@value='start']">
<xsl:element name="entity">
<xsl:value-of select="."/>
</xsl:element>
<xsl:for-each select="following-sibling::*">
<td><xsl:value-of select="."/></td>
</xsl:for-each>
</xsl:template>
how do check wether the current node in the for-eachnode is the
"somenode"-node with "stop" as attribute value? Can I "break out" of
for each or somehow if-then the inclusion of anything that comes
_after_ that?
As you probably see I do not have a really good undstanding of
XSL/XPATH. Browsing the docs and XSL FAQ did not make me wiser either.
Any help is greatly appreciated
Thanks in advance and
Cheers
Jakob
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Moving an element along w, Pankaj Chaturvedi | Thread | Re: [xsl] following nodes until "st, Mukul Gandhi |
| Re: [xsl] Moving an element along w, David Carlisle | Date | Re: [xsl] following nodes until "st, Mukul Gandhi |
| Month |