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

> 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...

Regards,
Vojtech

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