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

RE: Children of p:choose - why are xpath-context and variable ordered?

From: <Toman_Vojtech@emc.com>
Date: Fri, 15 Aug 2008 10:40:58 -0400
Message-ID: <6E216CCE0679B5489A61125D0EFEC7870C3ABD70@CORPUSMX10A.corp.emc.com>
To: <public-xml-processing-model-wg@w3.org>

> I suspect people are going to find it difficult to remember the
> required order here, and indeed the DTD and the RNG have opposite
> orders.  How about we have
>  ((p:xpath-context? & p:variable*),
>   p:when*, p:otherwise?)
> or, better, but more prolix:
>  (p:variable*,
>   (p:xpath-context, p:variable*)?,
>   p:when*, p:otherwise?)

I thought that the main reason why p:variable comes after
p:xpath-context is to make sure that if you specify a p:xpath-context in
p:choose, it will be used as an XPath context for p:variable/@select as
well (if no binding is specified there), and not only for the branches.
If some p:variables could be before p:xpath-context and some after it,
individual p:variables would potentially be using different XPath
contexts (which would be both confusing and harder to implement).

But: I just read the spec again and I am not sure whether my
understanding was correct any more...

Received on Friday, 15 August 2008 14:43:06 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:46 UTC