RE: In-scope variable bindings in p:variable

> 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 UTC