W3C home > Mailing lists > Public > public-xml-processing-model-comments@w3.org > August 2009

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

From: James Fuller <james.fuller.2007@gmail.com>
Date: Fri, 7 Aug 2009 13:49:19 +0200
Message-ID: <a0ad8ffe0908070449m50290e7el9b0eaa39a49ed247@mail.gmail.com>
To: Toman_Vojtech@emc.com
Cc: public-xml-processing-model-comments@w3.org
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 7 August 2009 11:49:59 GMT