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

/ Jeni Tennison <jeni@jenitennison.com> was heard to say:
| 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.

I suppose that's an option. Running out of memory if you can't buffer
everything you need to is just a fact of life, I guess.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | No man is more than another if he does
http://nwalsh.com/            | no more than another.-- Cervantes

Received on Thursday, 24 May 2007 18:42:55 UTC