[Bug 5812] New: Consequence of specifying out-of-range weight value not specified

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5812

           Summary: Consequence of specifying out-of-range weight value not
                    specified
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Full Text 1.0
        AssignedTo: jim.melton@acm.org
        ReportedBy: jim.melton@acm.org
         QAContact: public-qt-comments@w3.org


In Section 3, Full-Text Selections, the last sentence of the third paragraph
reads: The RangeExpr is evaluated, as if it were an argument to a function with
an expected type xs:double; it must be between 0.0 and 1000.0 inclusive.

That sentence does not specify what should happen if a weight value is provided
that is outside of the range, nor does anything else I can find in the spec. 
If weight were always a literal, then perhaps we could just make it a parse
error.  But weight is a RangeExpr, which can also be things like variables. 

Reasonable choices for "what happens" might be:

* Raise a specific error (to be determined). 

* Turn all values greater than 1000.0 into 1000.0 and values less than 0.0 into
0.0. 

Unreasonable choices might be to return nothing at all (bad because
implementations might assign a meaning to out-of-range values and that would
make it more difficult for us to do so in the future) or to compute the result
as the specified value modulo 1000.0 (bad because 1000.1 would become 0.1). 

On a related note, I observe that the statement in Section 3 is absolute, while
Section 5.2.15, "Weights" says: An implementation may constrain the range of
valid weights to non-negative values.

>From the text in Section 3, I don't see how implementations need to anything at
all to "constrain the range".  Considering that Section 5.2 is Optional
Features, it's unclear to me what the intent of 5.2.15 really is.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 26 June 2008 17:13:42 UTC