Re: can we have last() having a consistent value ?

Jeni,

You just make the point, I was fearing

Since we have position()....why not having last() !!

And that would be the question every user would do

And I don't want to pave the way to our own destruction...

Here is my proposal

Since making context having more sense than just (size=1/position=1)
imply most immediately that last() has a sense

I propose

to make a special function p:position() with the semantic we have said
and make for V.next the fixing of the context if we think it will be sensible

Mohamed

On 5/24/07, Jeni Tennison <jeni@jenitennison.com> wrote:
>
> Norman Walsh wrote:
> > Here are the options as I see them:
> >
> > 1. We use context position and context size and we make them be
> > correct. The context size is the number of documents in the sequence
> > and the context position is the number of the document in that
> > sequence.
> [snip]
> > Only in case 1 do we get complete consistency. But that totally
> > prevents a streaming implementation and requires (possibly massive
> > amounts of) buffering. I don't think it'll be difficult to persuade
> > our users that this is an unattractive option. (What's more, if they
> > have a step that actually really needs to know how many documents
> > are in the sequence, they can compute it with p:count.)
>
> What would be the problem with implementations detecting whether a
> particular XPath has a call to the last() function in it, and either
> streaming or buffering based on that? I agree that we don't want to take
> the hit of buffering everything whenever the processor evaluates an
> XPath expression, but I don't see why implementations have to be that dumb.
>
> Jeni
> --
> Jeni Tennison
> http://www.jenitennison.com
>
>


-- 
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 Saturday, 26 May 2007 08:21:44 UTC