W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > June 2010

In-scope variable bindings in p:variable

From: <Toman_Vojtech@emc.com>
Date: Mon, 21 Jun 2010 10:04:25 -0400
Message-ID: <997C307BEB90984EBE935699389EC41C01B1778D@CORPUSMX70C.corp.emc.com>
To: <public-xml-processing-model-wg@w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 21 June 2010 14:05:20 GMT