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

p:choose/p:xpath-context question

From: <Toman_Vojtech@emc.com>
Date: Fri, 7 Aug 2009 04:02:03 -0400
Message-ID: <6E216CCE0679B5489A61125D0EFEC787106BA0A8@CORPUSMX10A.corp.emc.com>
To: <public-xml-processing-model-comments@w3.org>
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 08:04:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 7 August 2009 08:04:15 GMT