RE: namespaces on p:variable?

> I don't actually propose that we do anything about it if the answer is
> "no", but can anyone think of any case where you'd actually need
> p:namespaces on p:variable?

Hmmmmmmmmmmmmmm. One possible use case for p:namespaces in p:variable
could be to dynamically construct the namespace bindings for evaluating
the select XPath expression:

<p:pipeline>
  <p:variable name="var" select="count(//foo:*)">
    <p:namespaces element="/*"/>
  </p:variable>
  ...
</p:pipeline>

I think the above pipeline should work, provided the document passed to
the pipeline specifies a namespace binding for the prefix "foo" on the
document element. Implementing the same functionality without
p:namespaces would be impossible.

Regards,
Vojtech

Received on Thursday, 22 April 2010 12:12:14 UTC