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>

Consider this example of p:choose:

<p:identity name="identity"/>
    <p:document href="foo.xml"/>
  <p:when test="...">

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?

Received on Friday, 7 August 2009 08:04:14 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:28:27 UTC