|
Subject: Re: [xsl] how to set the pattern to get the node From: Geert Josten <Geert.Josten@xxxxxxxxxxx> Date: Tue, 30 Nov 2004 06:32:09 +0100 |
How I can get the node which parent_ID =1 or parent_ID is not 1 but No other sibling node List_ID equal to current node parent_ID
I try to use: <xsl:template match="List[Parent_ID=1 or not(../List[List_ID = current()/Parent_ID])] ">
<xsl:template match="List">
<xsl:variable name="self" select="."/> <!-- current() can be shortened to . -->
<xsl:choose>
<xsl:when test="Parent_ID = 1">
<!-- found a valid case -->
</xsl:when>
<xsl:when test="not(preceding-sibling::List[List_ID = $self/@Parent_ID]
or following-sibling::List[List_ID = $self/@Parent_ID])">
<!-- found second valid case -->
</xsl:when>
<!-- xsl:otherwise? -->
</xsl:choose>
</xsl:template>Cheers, Geert
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] how to set the pattern to get, que Li | Thread | Re: [xsl] how to set the pattern to, que Li |
| RE: [xsl] grouping date ranges with, dsk | Date | [xsl] Xsl question (embedding an x, babu.eshwaramoorthy |
| Month |