|
Subject: RE: if testing elements From: "Richard Lander" <rlander@xxxxxxxxxxxxxxxxxxx> Date: Mon, 1 Nov 1999 17:57:05 -0500 |
Michael,
Why not try:
<xsl:template match="FOO/GREEN">
... do something for Green BAR
</xsl:template>
I hope that helps,
Richard.
-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Michael Welz
Sent: Monday, November 01, 1999 5:29 PM
To: XSL-List@xxxxxxxxxxxxxxxx
Subject: xsl:if testing elements
How can I use xsl:if to test for a particular element value using
http://www.w3.org/1999/XSL/Transform?
For the xml:
<FOO>
<BAR> Green </BAR>
</FOO>
And the xsl:
<xsl:template match="FOO">
<xsl:if test="BAR = 'Green'">
... do something for Green BAR
</xsl:if>
</xsl:template>
If BAR was an attribute of FOO, I can do "@BAR = 'Green'" with no problems,
but I don't want to base my selection attributes/elements on an
implementation (possibly?) detail like that.
I have in the past used ".[BAR = 'Green']" but that gives me a syntax error
now.
TIA,
Mike
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| xsl:if testing elements, Michael Welz | Thread | Re: xsl:if testing elements, David Carlisle |
| xsl:if testing elements, Michael Welz | Date | Re: XML/XSL on the client for dynam, Tim Taylor |
| Month |