Subject: Re: selection with multiple keys From: David_Marston@xxxxxxxxx Date: Thu, 20 Jan 2000 14:21:42 -0500 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
selection with multiple keys, DUDGEON | Thread | RE: selection with multiple keys, Kay Michael |
How to do numeric validations in DT, Con_Shravan Gunda | Date | How to find out the existence of an, Truong, Bon |
Month |