<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>6811</bug_id>
          
          <creation_ts>2009-04-14 20:45:08 +0000</creation_ts>
          <short_desc>[FT] Specification/Weights</short_desc>
          <delta_ts>2009-06-09 14:27:56 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Full Text 1.0</component>
          <version>Candidate Recommendation</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Christian Gruen">christian.gruen</reporter>
          <assigned_to name="Jim Melton">jim.melton</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>24727</commentid>
    <comment_count>0</comment_count>
    <who name="Christian Gruen">christian.gruen</who>
    <bug_when>2009-04-14 20:45:08 +0000</bug_when>
    <thetext>Hi all,

a minor one: I noticed that the latest version of the specification allows arbitrary values for weight values. In section &quot;3.1.1 Weights&quot;, weights are still limited to absolute values from 0-1000. Was this a deliberate choice or a relict from the old rule?

Christian</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24906</commentid>
    <comment_count>1</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2009-04-23 19:26:14 +0000</bug_when>
    <thetext>Christian, this was a deliberate decision, reached after considerable discussion.  There were many opinions expressed but we finally decided that leaving the range of weights to fall between -1000 and +1000 (and the decision of whether or not to support negative weights left implementation-defined) was a good compromise. 

I&apos;m marking this bug INVALID and request that you mark it CLOSED. </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24907</commentid>
    <comment_count>2</comment_count>
    <who name="Christian Gruen">christian.gruen</who>
    <bug_when>2009-04-23 19:49:12 +0000</bug_when>
    <thetext>Hi Jim, sorry for persisting.. As the current text states that &quot;The weight MUST have an absolute value between 0.0 and 1000.0 inclusive.&quot;, I am not sure if implementation-defined, negative weights are considered at this point. Next to that, was there a special reason to use &quot;1000&quot; as value/introduce a restriction at all? I would rather have expected a strict rule (0.0 - 1.0) or no restriction at all.

And, another trivia here.. I wonder why a weight value is defined by a &quot;RangeExpr&quot;. as I would expect the weight to be always exactly one value. The existing rule...

  [145] FTWeight ::= &quot;weight&quot; RangeExpr

..would allow expression such as 

  &quot;A&quot; ftcontains &quot;A&quot; weight (1 to 2)

which will not make too much sense. Anyway, as usual.. if I have stopped thinking too early - please tell me!

Thanks,
Christian
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24978</commentid>
    <comment_count>3</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2009-04-30 22:39:41 +0000</bug_when>
    <thetext>&gt; Hi Jim, sorry for persisting.. 

No need to apologize; reaching understanding is important. 

&gt; As the current text states that &quot;The weight MUST
&gt; have an absolute value between 0.0 and 1000.0 inclusive.&quot;, I am not sure if
&gt; implementation-defined, negative weights are considered at this point. 

Yes, that is why it says &quot;absolute value&quot;, just in case the implementation does support negative weights.

&gt; Next to
&gt; that, was there a special reason to use &quot;1000&quot; as value/introduce a
&gt; restriction at all? I would rather have expected a strict rule (0.0 - 1.0)
&gt; or no restriction at all.

No special reason, just the result of the Task Force&apos;s discussion.  I also thought that a range (absolute value, of course) of 0.0-1.0 would have been just as good.  If I recall correctly, I think somebody said that they knew about, or had, an implementation that used larger numbers.  Since it&apos;s pretty arbitrary anyway, we decided to go with the 1000 top end. 

&gt; And, another trivia here.. I wonder why a weight value is defined by a
&gt; &quot;RangeExpr&quot;. as I would expect the weight to be always exactly one value. The
&gt; existing rule...

&gt;   [145] FTWeight ::= &quot;weight&quot; RangeExpr

&gt; ..would allow expression such as 

&gt;   &quot;A&quot; ftcontains &quot;A&quot; weight (1 to 2)

&gt; which will not make too much sense. 

Of course, you&apos;re right that it would not make sense to have (1 to 2) as a weight.  And, in fact, the language does not support that.  The use of RangeExpr is merely an artifact of how the grammar is constructed. 

&gt; Anyway, as usual.. if I have stopped
&gt; thinking too early - please tell me!

No problem at all!
   Jim

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24980</commentid>
    <comment_count>4</comment_count>
    <who name="Christian Gruen">christian.gruen</who>
    <bug_when>2009-04-30 23:18:17 +0000</bug_when>
    <thetext>Hi Jim,

&gt; Yes, that is why it says &quot;absolute value&quot;, just in case the
&gt; implementation does support negative weights.

Oh yes.. Sorry, I mixed up &quot;absolute&quot; with &quot;positive&quot;.


&gt;&gt; Next to
&gt;&gt; that, was there a special reason to use &quot;1000&quot; as value/introduce a
&gt;&gt; restriction at all? I would rather have expected a strict rule (0.0 - 1.0)
&gt;&gt; or no restriction at all.
&gt;
&gt; No special reason, just the result of the Task Force&apos;s discussion.  I also
&gt; thought that a range (absolute value, of course) of 0.0-1.0 would have been
&gt; just as good.  If I recall correctly, I think somebody said that they knew
&gt; about, or had, an implementation that used larger numbers.  Since it&apos;s pretty
&gt; arbitrary anyway, we decided to go with the 1000 top end. 

So, once again.. I currently don&apos;t see any advantage in restricting the weight at all, so wouldn&apos;t make it sense - and simplify the specification - if the restriction was completely discarded and arbitrary values were allowed? The same can be said about negative weights. - Anyway, considering the implementation point of view, it&apos;s of course no problem to add a check at this point (although it will be have to be checked every time during runtime, if the weight argument cannot be statically checked).

Christian

</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>