Re: Variables/Parameters and Scoping

Hi Mohamed,

We'll have to agree to disagree on the usability issues.

> I think we have two different kind of concepts :
> * The "context" attribute which tell against which documents the xpath 
> is being evaluted
> * The "uses" attribute which tell us about hidden dependencies, which 
> are not explicit in the "context" attribute
> 
> (Note : please not the quotes, because i'm not sure this wording will 
> convince everyone)
> 
> These two attributes should take a list of qnames refering to *DOCUMENTS*

Note that the context can only be set to a single node, unless you're 
imagining an implicit for-each?

> But what about, document() function or context() function in a 
> p:for-each or any other nasty construction...

The document() function is an XSLT 1.0 function, so it wouldn't be 
included in XPath 1.0.

I'm not familiar with the context() function. Perhaps you meant the 
current() function from XSLT 1.0? Again, that wouldn't be included in 
XPath 1.0, which is what we're using.

In either case, I'm not sure what you're trying to get at: the only 
thing we need be concerned about is working out which inputs (and 
variables) are referred to in a particular variable declaration. The 
only way to refer to a variable in XPath is through a variable reference 
(which looks like "$var"): you can't refer to a variable using a 
function call.

Cheers,

Jeni
-- 
Jeni Tennison
http://www.jenitennison.com

Received on Monday, 29 May 2006 18:36:27 UTC