Subject: RE: XPath help
From: "Rene de Vries" <RdVries@xxxxxxxxxxx>
Date: Fri, 7 Sep 2001 16:02:02 +0200
|
Try:
<xsl:for-each select="*[not(name()='a' or name()='b')]">
Greetings René
{@ @}
^
\_/
"You don't need eyes to see, you need vision!"
-----Oorspronkelijk bericht-----
Van: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]Namens William Bagby
Verzonden: vrijdag 7 september 2001 15:49
Aan: XSL Mailing List (E-mail)
Onderwerp: XPath help
What XPath do I use to specify "elements which are neither <a> nor <b>"?
Here's an example:
<top>
<a>1</a>
<a>2</a>
<a>3</a>
<b>1</b>
<b>2</b>
<c>1</c>
<c>2</c>
<c>3</c>
<c>4</c>
<c>5</c>
<d>1</d>
<d>2</d>
</top>
I would like to iterate over all but the <a> and <b> elements, in this case,
<c> and <d> elements.
Something like this is what I had in mind:
<xsl:template match="top">
<xsl:for-each select="*[not(a|b)]">
<!-- do something -->
</xsl:for-each>
</xsl:template>
But it does not seem to work. I can't find the syntax for this, but it can't
be that hard. Suggestions?
William Bagby.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- XPath help
- William Bagby - Fri, 7 Sep 2001 09:50:52 -0400 (EDT)
- <Possible follow-ups>
- Rene de Vries - Fri, 7 Sep 2001 10:10:24 -0400 (EDT) <=
- Jeffrey Langdon - Fri, 7 Sep 2001 10:38:04 -0400 (EDT)
|
|