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

RE: In-scope variable bindings in p:variable

From: <Toman_Vojtech@emc.com>
Date: Tue, 22 Jun 2010 03:11:58 -0400
Message-ID: <997C307BEB90984EBE935699389EC41C01B17A6B@CORPUSMX70C.corp.emc.com>
To: <public-xml-processing-model-wg@w3.org>
> The third paragraph of 5.7.1 says, of p:variable, in part:
> 
>   ...with the addition of bindings for all preceding-sibling
>   p:variable and p:option elements.
> 
> So I think the example above is pretty clearly allowed.

Thanks, that is exactly what I needed (and missed).

> 
> > Based on the xproc-dev discussion, it
> > looks like Calabash does not support this - but Calumet does.
> 
> That's news to me; 

I am not completely sure about that, I deduced that from the
conversation. Apparently this fails with Calabash ("variable divID not
declared"):

...
<p:for-each name="forEachChunk">
  <p:variable name="divID" select="/*/@id"/>
  <p:variable name="ancestorID"
select="//div[@id=$divID]/ancestor::chapter[1]/@id">
    <p:pipe port=result" step="loadDocument"/>
  </p:variable>
  ...
</p:for-each>
...

I suggested a workaround which (per user's response to me) seems to
work:

...
<p:for-each name="forEachChunk">
  <p:variable name="divID" select="/*/@id"/>
  <p:group>
    <p:variable name="ancestorID"
select="//div[@id=$divID]/ancestor::chapter[1]/@id">
      <p:pipe port=result" step="loadDocument"/>
    </p:variable>
    ...
  </p:group>
<p:for-each>
...

Regards,
Vojtech
Received on Tuesday, 22 June 2010 07:12:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 June 2010 07:12:44 GMT