|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Generating a list of items NOT present in source X
Hi Greg, >> <xsl:with-param name="count" select="count + 1" /> > > [ Just for those following this thread (and later > in the archives), the above line (and others like > it) should probably read as > <xsl:with-param name="count" select="$count + 1" /> > Note the dollar-sign before 'count'. Without it, > you will have an infinite recursion. ] Good catch! Whoops. > The above works for the simple XML document given in the previous > post because the string() of the obj node is the same as the > string() of the only contained obj/childnode node. What is the best > way (or is there a way) to allow $index to be converted from a > string to the XPath that the string represents? You can't do dynamic evaluation of XPaths within XSLT. If you just want to go down one level, the best way is to have $index hold a string just containing the name of the child node that you want to select. Then you can do: <xsl:when test="$start-number > $nodes[1]/*[local-name() = $index]"> ... </xsl:when> and so on. (I'm not really sure why you want to do it like this -- why not pass in the childnodes directly?) Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ 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
|

Cart








