[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: selection with multiple keys

Subject: Re: selection with multiple keys
From: David_Marston@xxxxxxxxx
Date: Thu, 20 Jan 2000 14:21:42 -0500
xsl 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.