Re: p:choose/p:xpath-context question

my implementation would use p:xpath-context

J

On Fri, Aug 7, 2009 at 10:02 AM, <Toman_Vojtech@emc.com> wrote:
> Hi,
>
> Consider this example of p:choose:
>
> ...
> <p:identity name="identity"/>
> <p:choose>
>  <p:xpath-context>
>    <p:document href="foo.xml"/>
>  </p:xpath-context>
>  <p:when test="...">
>    <p:xpath-context/>
>    ...
>  </p:when>
> </p:choose>
> ...
>
> My question is: what will be the XPath context for the p:when? Will it
> be "foo.xml", or the result of the "identity" step?
>
> The spec says that: "When [p:xpath-context] appears in a p:when, it
> specifies the context for that p:when's test attribute. When it appears
> in p:choose, it specifies the default context for all of the p:when
> elements in that p:choose."
>
> In the example above, p:xpath-context *appears* in p:when, but *has no
> binding*. In our current implementation, this will result in a binding
> to the current default readable port (result of "identity" in this
> case). Is this the correct/expected behavior?
>
> Regards,
> Vojtech
>
>

Received on Friday, 7 August 2009 11:49:59 UTC