[Bug 2724] Context position : some inconsistencies about what it is supposed to be.


           Summary: Context position : some inconsistencies about what it is
                    supposed to be.
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: pierrick.brihaye@culture.gouv.fr
         QAContact: public-qt-comments@w3.org

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 ?

Received on Wednesday, 18 January 2006 08:15:49 UTC