This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In section 3.9, note #1, functions are listed which may return nondeterministic results in a region of the query where ordering mode is "unordered". The list includes the function fn:last. As this function returns the context size, I should expect it to be independent of the ordering mode. So I doubt whether it is correct to include it in the list.
Actually, the whole note is a bit sloppy. I think what it's trying to say is that in unordered mode, it's indeterminate which element will be returned by an expression such as (//a)[last()]. You have to read the caveat for all these functions in the same way: the behaviour of the function itself is determinate, but if it is used in an expression along with operands that evaluate sequences in unordered mode, the overall result is unpredictable and meaningless. Michael Kay (personal response)
Hans-Juergen, Thanks for this comment. You are correct. I have rewritten the Note in Section 3.9 to clarify that it is the query rather than the function that is nondeterministic. Since this bug report is classified as editorial and I have made the corrections, I have changed its status to Closed. The corrections will appear in the next published version of the XQuery specification. Regards, Don Chamberlin (for the Query Working Group)