|
Subject: [xsl] conditional processing <xsl: when test ...> From: Kris Kolodziej <kkolodziej@xxxxxxxxxxxx> Date: Tue, 28 Aug 2001 16:54:42 -0400 |
Hi list,
I want to design a stylesheet that will do conditional transformation/
processing depending on my SQL expression, specifically the signs within
the expression (i.e., "< | >" or "=").
*****part of my XML is:
<SqlExpression where="'avg > 9' and 'avg < 200'" />
OR
<SqlExpression where="avg=9" />
<!-- NOTE that I will have cases where I will either have "avg" "sum"
"min" etc...This will have to be implemented later in my stylesheet -->
*****part of my stylesheet is:
<xsl:choose>
<!-- use EXACT if SqlExpression has an "=" sign" -->
<xsl:when test="//SqlExpression/@where=attribute(=)">
<EXACT value="9">
</xsl:when>
<!-- otherwise -->
<!-- use RANGE if SqlExpression has an "<" or ">" sign -->
<xsl:when test="//SqlExpression/@where=attribute(< | >)">
<RANGE lower="9" upper="200" > <!-- I will have to do
something here in order to be accurate about the actual range, since the
">" sign is used, as opposed to ">=" ...)
</xsl:when>
</EXACT>
</RANGE>
</xsl:choose>
Am I using the "=attribute()" correct? Am I on the right track?
THanks!
Kris
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] XML: What am I missing?, Julian Reschke | Thread | RE: [xsl] conditional processing <x, Jarno . Elovirta |
| [xsl] XML: What am I missing?, ComCity | Date | RE: [xsl] XML: What am I missing?, Chris Bayes |
| Month |