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

Re: xsl:key in a function?

Subject: Re: xsl:key in a function?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 05 Mar 2012 22:00:25 +0000
Re:  xsl:key in a function?
On 05/03/2012 20:12, ihe onwuka wrote:
As a matter of fact is it even even possible to have xsl:key in a
custom function?

It's not clear what you mean by custom function gere, do you mean an xsl-defined function using xsl:function, or an extension function?

In the former case, you can use a key, but as in templates they key()
function is used in the function or template, but xsl:key is a top level
declaration that is always a child of xsl:stylesheet.

You also need recall at the top level of a function body there is no
current node, so no current document, so you need to pass a node in as
the third argument of key() or use xsl:for-each or a similar construct within the function body so that there is a current document at the point you call key().


If you mean that you want to write an extension function, then that's not xslt so I'm not sure what using xsl:key would mean at all?


David -- google plus: https:/profiles.google.com/d.p.carlisle

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.