[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xsl:help using xsl:when

Subject: xsl:help using xsl:when
From: "Irfan A. Mohammed" <irfan@xxxxxxxxxxxx>
Date: Wed, 8 Dec 1999 12:52:52 -0500
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.