Subject: Re: [xsl] Using key with XPath and use value? From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 15 Jan 2003 12:31:17 -0500 |
<xsl:key name="pubsBySubheadandB" match="d" use="concat(generate-id(ancestor::b), '-', @pub)"/>
Cheers, Wendell
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.
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Using key with XPath and use , Liguori, Steven | Thread | [xsl] FW: Question about strings., Patel, Viral |
[xsl] FW: Question about strings., Patel, Viral | Date | [xsl] Keeping an eye on processed n, Gustaf Liljegren |
Month |