[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: selection with multiple keys
Dr. Tim Dudgeon (dudgeon@xxxxxxxxxxxxx) writes: >I've found keys, defined with xsl:key and selected with the key() function >real useful. However I'm having problems selecting using multiple keys. >...Finally I tried using a node set as the second argument to key(), as the >XSLT standards says >'When the second argument to the key function is of type node-set, then the >result is the union of the result of applying the key function to the string >value of each of the nodes in the argument node-set.' >However this sort of expression also returns nothing: ><xsl:apply-templates select="key('PrID', /document/ruleset/rule/@id)"/> We have a test here at Lotus (known as IDKY17 in our test suite) that tests this exact provision of the spec. The test currently passes on 0.19.2. The only difference from what you report above is that the test uses for-each instead of apply-templates. As a warm-up, you could try <xsl:value-of select="count(key('PrID',path))"/> to ensure that you get as many nodes as you expect. Naturally, I'm assuming that you can't change the source document to add a new attribute specifically to be used in a keyspace. David Marston 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
|