This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The specs give very strict indications about how context positions should be assigned a value : Its value is always an integer greater than zero The position of the first item in a sequence is always 1 (one) The context position is always less than or equal to the context size Context positions are assigned to items based on their ordinal position in the result sequence. The first context position is 1. The context position is the position of the context item within the sequence of items currently being processed. Sometimes however, other solutions are (fortunately) possible : During evaluation of a function body, the focus (context item, context position, and context size) is undefined [C.2 Dynamic Context Components] Default initial value : none Consistency rules : If context item is defined, context position must be >0 and <= context size; else context position is undefined. May the specs be more consistent and precise about defined/undefined focus ?
Context position is sometimes undefined. In contexts where it is defined, our specs say how it is defined. In contexts where it can be undefined, we state that fact. I do not understand what is inconsistent or imprecise about our specs with respect to context position - can you please clarify?
I just request some precisions that would make paragraphs more "autonomous". For example : [Definition: The context position is the position of the context item within the sequence of items currently being processed.] I would preprend something like : "When the focus is defined..." The like for : The context position is the position of the context item within the sequence of items currently being processed. I could cope with the expression of the C2 table ("If context item is defined") but the notion of "focus" looks to me more generic.
Pierrick, Thanks for your comment. The Query and XSLT working groups considered your comment on 02 Feb 2006 and agreed to add the phrase "When the focus is defined" to the definition of context position, as you suggested. The change will be included in the next published version of the XPath and XQuery specifications. Since we consider this to be an editorial rather than a substantive change, I have marked this issue as closed. Regards, Don Chamberlin, for the Query and XSLT working groups