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

Accessing context from xsl:function body

Subject: Accessing context from xsl:function body
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Thu, 8 Nov 2007 13:59:31 +0530
 Accessing context from xsl:function body
Hi all,
  Could somebody please answer this for me ...

Recently I was solving some problem, where I needed the capability for
the xsl:function body to be able to access the context (the
environment from where the function was called, say a particular XPath
expression).

But the XSLT 2.0 spec states ...
"Within the body of a stylesheet function, the focus is initially
undefined; this means that any attempt to reference the context item,
context position, or context size is a non-recoverable dynamic error.
[XPDY0002]"

Why does XSLT 2.0 language prohibits xsl:function to access the
context information?

On the contrary, the named template can access the context
information. Why is this difference in capability on named template,
and xsl:function?

Is there any use case, where xsl:function body would really need the
context information? Is there a merit in the argument, to provide this
capability to xsl:function?

-- 
Regards,
Mukul Gandhi

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.