[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[xsl] same xpath, different results?
Subject: [xsl] same xpath, different results? From: "Corey Wilson" <corey@xxxxxxxxxxxxxxxxxxxxxx> Date: Mon, 23 Jun 2003 10:05:52 -0400 |
<xsl:variable name="totalComm"> <xsl:variable name="whichRate"> <xsl:choose> <xsl:when test="js:overYear(string(../../dateEntered)) = 'false'"> <!-- xsl:value-of select="./commissions/commission[earnerId=$earnerId]/product[productId=../.. /../products/product/id]/rate" / --> <xsl:value-of select="./products/product[id=../../commissions/commission[earnerId=$earnerI d]/product/productId]/count" /> </xsl:when> <xsl:otherwise> <xsl:value-of select="./products/product[id=../../commissions/commission[earnerId=$earnerI d]/product/productId]/count" /> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:call-template name="commTotal"> <xsl:with-param name="cnt" select="./products/product[id=../../commissions/commission[earnerId=$earnerI d]/product/productId]/count" /> <xsl:with-param name="baseCst" select="$whichRate" /> </xsl:call-template> </xsl:variable> In the above code, I am trying to pick a different rate based on a "dateEntred" node. I am not sure why, but the variable $whichRate will always have only 1 element but the paramater cnt will have a variable number of elements... The variable number of elements is what I am going for, but it doesn't seem to work in the first test. The reason I put the same xpath in all of them was just for testing purposes. The reason I am doing this is trying to get either a "rate" or "secondaryRate" depending on the "dateEntered". Thanks for any help! XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] identity transform exclud, Jarno . Elovirta | Thread | Re: [xsl] same xpath, different res, David Carlisle |
Re: [xsl] identity transform exclud, I-Lin Kuo | Date | RE: [xsl] Unable to send my comment, Michael Kay |
Month |
Keywords