|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Using key with XPath and use value?
Steven,
You can enhance your key by including in its value some kind of identifier of the b element, to disambiguate d elements not only by their @pub, but by their b ancestors, as in: <xsl:key name="pubsBySubheadandB" match="d" use="concat(generate-id(ancestor::b), '-', @pub)"/> With this trick, you want to be careful, since the expression in @use now returns a string not a node-set. But since you never have more than one @pub per b element (attributes being what they are), you're okay here. Naturally when you call the key you need to perform the same concatenation. Cheers, Wendell At 12:14 PM 1/15/2003, you wrote: 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? ====================================================================== 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 ====================================================================== 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
|

Cart








