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

question about test="total[. $lt$ 10]

Subject: question about test="total[. $lt$ 10]
From: caihongshui <caimoney@xxxxxxx>
Date: Sat, 3 Mar 2001 11:56:49 +0800
question tota...
xsl-list£¬
i wrote an xml document and an xsl document such as the following:
<?xml version="1.0"?>

<?xml-stylesheet type="text/xsl" href="ee.xsl"?> 

<orders>
<order>
44
<total>2
</total>
</order>

<order>
13

<total>14
</total>
</order>
<order>
2
<total>65
</total>
</order>
</orders>
--------------------------------------------------------

 <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">aaaa
<xsl:apply-templates />

</xsl:template>

<xsl:template match="orders">
sdfsfs
<xsl:for-each select="order">
            
   <xsl:choose>
      <xsl:when test="total[. $lt$ 10]">
         <hr style="color:red"/>
      </xsl:when>
      <xsl:when test="total[. $lt$ 20]">
          <hr style="color:pink"/>
      </xsl:when>
      <xsl:otherwise> <hr style="color:green"/>
      </xsl:otherwise>
    </xsl:choose>
    </xsl:for-each>
</xsl:template>
</xsl:stylesheet>

i wanted to see three lines :grren,pink and red.but it appeared red,pink,and green.i 
know if i wrote "total" in front of [. $lt$ 10],then it would work according to the 
element "total".but i don't know how to make it works accroding to the element 
"order".
all of the upper is an experence ,beacause i just know a part of  the attribute: 
"test"  


best regard


                                                           amy


 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.