|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xsl:help using xsl:when
Hi,
I need help on making selective output depending on the
value of a particular element in the node
My XML looks like this
<?xml version="1.0" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="some.xsl"?>
<PACKAGED>
<NVALUE>10</NVALUE>
</PACKAGED>
XSL file:
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"
xmlns:xslt="http://www.w3.org/TR/WD-xslt">
<xsl:template match="/">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="PACKAGED">
<xsl:value-of select="NVALUE"/>
<xsl:choose>
<xsl:when test="number(NVALUE)=10">
Yes
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
The "test condition" fails.
How do I test for VALUE=10 and output some test and if the value is
11, then output something else?
Thank you,
Regards,
- Irfan
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








