This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5812 - [FT] Consequence of specifying out-of-range weight value not specified
Summary: [FT] Consequence of specifying out-of-range weight value not specified
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Full Text 1.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Jim Melton
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-26 17:13 UTC by Jim Melton
Modified: 2008-08-26 18:20 UTC (History)
1 user (show)

See Also:


Attachments

Description Jim Melton 2008-06-26 17:13:07 UTC
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.
Comment 1 Mary Holstege 2008-08-04 19:18:00 UTC
With respect to section 5.2.15, the text in section 3 should say that the absolute value should be less than 1000. See #3905.

On what happens if the value is not in the range, I'd suggest we extend the
definition of err:FTDY0016 and use it for out of range weights in general.
Comment 2 Jim Melton 2008-08-26 18:20:08 UTC
The Full-Text Task Force has discussed the problem and determined that the solution outlined in http://www.w3.org/Bugs/Public/show_bug.cgi?id=5812#c1 is the correct approach. Appropriate changes have been made to the internal draft of the FT spec.  We are therefore making this bug FIXED. 

Because you were present when the decision was made, we presume that you are satisfied and are also marking the bug CLOSED.