W3C home > Mailing lists > Public > public-qt-comments@w3.org > April 2008

[Bug 5620] fts:FormCombinations is incorrect

From: <bugzilla@farnsworth.w3.org>
Date: Thu, 10 Apr 2008 22:19:17 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1Jk56z-0001yE-Rx@farnsworth.w3.org>

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





------- Comment #2 from thomas.baby@oracle.com  2008-04-10 22:19 -------
Some of the existing functions have also been changed to now invoke the new
function fts:FormCombinationsAtLeast, instead of fts:FormCombinations. These
functions are listed below:

declare function fts:FormRange (
      $sms as element(fts:match)*, 
      $l as xs:integer, 
      $u as xs:integer, 
      $stokenNum as xs:integer ) 
   as element(fts:allMatches)
{
   if ($l > $u) then ()
   else 
      let $am1 := <fts:allMatches stokenNum="{$stokenNum}">
                     {fts:FormCombinationsAtLeast($sms, $l)}
                  </fts:allMatches>
      let $am2 := <fts:allMatches stokenNum="{$stokenNum}">
                     {fts:FormCombinationsAtLeast($sms, $u+1)}
                  </fts:allMatches>
      return fts:ApplyFTAnd($am1,
                            fts:ApplyFTUnaryNot($am2))
};


declare function fts:ApplyFTTimesAtLeast (
      $allMatches as element(fts:allMatches),
      $n as xs:integer ) 
   as element(fts:allMatches) 
{
   <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> 
   {fts:FormCombinationsAtLeast($allMatches/fts:match, $n)} 
   </fts:allMatches>
};
Received on Thursday, 10 April 2008 22:20:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:22 UTC