- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Thu, 31 May 2007 08:49:49 +0100
- To: public-xml-processing-model-wg@w3.org
Norm, Norman Walsh wrote: > / Jeni Tennison <jeni@jenitennison.com> was heard to say: > |> I think we should say that if an explicit context is not given then > |> there is no context. In that case, any expression that makes reference > |> to the context (by using "/", or position(), or anything else that > |> would refer to the context) is an error. > | > | I'd prefer it to default to the first document on the default readable port. > > Ack. No where else do we consider "the first document" of a sequence > as special. I think we should either make it the entire sequence or we > should make it undefined. Well, since you can't set a context node to a sequence, that's not really a choice. I understand the argument that it'd be a pain for implementers to provide context to all XPath expressions while still providing efficient applications, but given a choice between least surprise to users and least work to implementers, I'm going to opt for the former. In all other cases (eg <p:for-each>, <p:viewport>, <p:choose>), we say that the default readable port provides the context if one isn't specified explicitly. In the case of <p:choose> (where you also have to evaluate an XPath expression), it's a dynamic error if the default readable port gives a sequence: if you prefer that rule to picking the first document, I'd be happy with that. Cheers, Jeni -- Jeni Tennison http://www.jenitennison.com
Received on Thursday, 31 May 2007 07:50:06 UTC