Subject: [xsl] question about test="total[. $lt$ 10] From: caihongshui <caimoney@xxxxxxx> Date: Sat, 3 Mar 2001 11:56:49 +0800 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] using characters to delimit t, Adam Van Den Hoven | Thread | Re: [xsl] question about test="tota, Jeni Tennison |
Re: [xsl] RDDL as a delivery vehicl, Clark C. Evans | Date | RE: [xsl] xbind:module == xsl:scrip, Kaganovich, Yevgeniy |
Month |