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

RE : Re: Accessing elements with key via string

Subject: RE : Re: Accessing elements with key via string in variable
From: Florent Georges <darkman_spam@xxxxxxxx>
Date: Mon, 26 Jun 2006 12:21:14 +0200 (CEST)
accessing elements in a map
Tim Lebo wrote:

> I got the output I was looking for by adding a variable in
> my root template:

> <xsl:template match="/">
>   <xsl:variable name="input" select="*"/>

> and modifying the key access on line 14 to:

> <xsl:value-of select="concat(.,'
> ',count(key('things-by-a',.,$input)),$NL)"/>

> Is there a cleaner way to do it?

  I don't think so.  Personnaly, I use the three-parameters
version of key() only when I need a subtree, not a document.
If I just need to set the context node for the calling
point, I use instead:

    $input/key('things-by-a', .)

  But I guess it is a matter of taste.

  Regards,

--drkm
































	

	
		
___________________________________________________________________________ 
Yahoo! Mail riinvente le mail ! Dicouvrez le nouveau Yahoo! Mail et son interface rivolutionnaire.
http://fr.mail.yahoo.com

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.