- From: Innovimax SARL <innovimax@gmail.com>
- Date: Tue, 1 May 2007 22:35:40 +0200
- To: "Norman Walsh" <ndw@nwalsh.com>
- Cc: public-xml-processing-model-wg@w3.org
- Message-ID: <546c6c1c0705011335n595e176bx1cd79714a31b46c3@mail.gmail.com>
On 5/1/07, Norman Walsh <ndw@nwalsh.com> wrote: > > / Innovimax SARL <innovimax@gmail.com> was heard to say: > | I submit a proposal to make $p:position available everywhere > | It would be 0 for an empty sequence > | and 1 for a single document > | or the position of the current document in the sequence > > I'm not sure how "everywhere" applies. Can you give an example of > somewhere else you might want it? I suppose in p:for-each, but I > can't think of anywhere else where it makes sense. Clearly, p:for-each If we say that Axiom A: "evaluating an XPath over a sequence of document is equivalent to the sequential evaluation of that XPath over each document of the sequence" Then it could be done everywhere we have an XPath evaluated over a sequence or not More generally, we could say that all $p:* variable are stable on each document evaluation, but can vary trough the sequence evaluation, and we should reserve $p:* variables for useful information ($p:base-uri, $p:is-last-in-sequence, etc.) If we don't say Axiom A, then we could be able to evaluate something like "count(/)" ? | PS : in a case of empty sequence what would be the evaluation of an > | XPath expression ? > > That probably needs to be considered on a case-by-case basis. > > > let's start with : * "/" on an empty sequence ? -- Innovimax SARL Consulting, Training & XML Development 9, impasse des Orteaux 75020 Paris Tel : +33 8 72 475787 Fax : +33 1 4356 1746 http://www.innovimax.fr RCS Paris 488.018.631 SARL au capital de 10.000 €
Received on Tuesday, 1 May 2007 20:35:49 UTC