This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
XPath section 2.1.2 states: If any component in the focus is defined, all components of the focus are defined. For streaming in XSLT 3.0 we are defining situations where this is no longer the case: for example during streamed merging, it's possible to have the context item and context position known, but the context size cannot be determined without lookahead, so any call on last() throws a dynamic error. I would therefore suggest: (a) the above sentence should be deleted, to be replaced perhaps with a note: Note: Normally, if any component in the focus is defined, all components of the focus are defined. However, there may be situations where this is not the case, for example with streamed processing. (b) in the error conditions for position() and last() the sentence "A dynamic error is raised [err:XPDY0002] if the context item is absent." should change to say "context position"/"context size" rather than "context item". I don't actually envisage any situations where the context item is present and the context position is absent, nor situations where context position/size is present and context item is absent, but I see no reason to rule such things out for all possible invocations of XPath.
(In reply to Michael Kay from comment #0) > (b) in the error conditions for position() and last() the sentence "A > dynamic error is raised [err:XPDY0002] if the context item is absent." > should change to say "context position"/"context size" rather than "context > item". I assume that: 1. This error description is only in F&O 2. We need to change it for last(), but not for position(), since we decided to make this change only for context size.
The WG agreed to adopt this change as proposed and affirmed the assumptions in comment 1.
The description of fn:last has been amended accordingly.