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

Re: can a function return an element of a nodeset

Subject: Re: can a function return an element of a nodeset
From: Matthieu Ricaud-Dussarget <matthieu.ricaud@xxxxxxxxx>
Date: Thu, 13 Jan 2011 17:37:38 +0100
Re:  can a function return an element of a nodeset
Thanks you David,

I actually thought about using a key for this, but I give it up because I thought keys were supposed to be used within the same document...
But it doesn't seems so : I didn't know about this 3rd optional agrument in key() function !


I use Saxon as XSLT engine.

Thanks a lot David

Matthieu.

you could also do

key('id','123',doc('foo.xml'))

if you have a key set up as

<xsl:key name="id" match="*[@id]" use="@id"/>

using a key is probably quicker than using //*[@id=...] unless your xslt engine compiles them both to the same thing.

David


-- Matthieu Ricaud IGS-CP Service Livre numirique

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.