In-scope variable bindings in p:variable

Hi all,

When responding to a question on xproc-dev today
(http://lists.w3.org/Archives/Public/xproc-dev/2010Jun/0041.html), I
realized that the spec is perhaps a bit unclear about the in-scope
variable bindings that are in scope for p:variable/@select. More
specifically, is the following allowed?

<p:variable name="x" select="'foo'"/>
<p:variable name="y" select="$x"/>

If so, where does it follow from? Based on the xproc-dev discussion, it
looks like Calabash does not support this - but Calumet does.

For p:option, the spec explicitly says that: "the [XPath] variable
bindings consist only of bindings for options whose declaration precedes
the p:option itself in the surrounding step signature", but it does not
say anything similar for p:variable, only that all in-scope bindings are
visible. But looking at the definition of in-scope bindings (section 2.5
Environment), it seems to me that the example above will never work
because the variable "x" will never be in scope for "y".

Is that the intended behavior, or is it something we haven't noticed?

Regards,
Vojtech 

--
Vojtech Toman
Principal Software Engineer
EMC Corporation
toman_vojtech@emc.com
http://developer.emc.com/xmltech

Received on Monday, 21 June 2010 14:05:20 UTC