[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] same xpath, different results?
<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
|
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
|