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

Using key with XPath and use value?

Subject: Using key with XPath and use value?
From: "Liguori, Steven" <Steven.Liguori@xxxxxxxxxxxxx>
Date: Wed, 15 Jan 2003 11:14:10 -0600
xpath key
If <xsl:key> is defined at the top-level of a document (i.e., globally), can
you get to values based on the XPath as well as the key value? 

For example, I'm attempting to output subheads based on the attribute value
of an element. I have element <b> which can have several element <d>
descendants. <d> has a 'pub' attribute which is used to determine the
subhead I need and all matching pub attributes are grouped for output under
the appropriate subhead. <b>, however, can occur any number of times in a
document. If I define a key as such:

<xsl:key name="pubsBySubhead" match="d" use="@pub"/>

can I get to the values for only the specific <b> for which I'm processing?
I seem to be getting everything indexed in the key for each matching @pub,
which is basically all the matches thoughout the whole document.

Any help appreciated!


 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.