<?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>5574</bug_id>
          
          <creation_ts>2008-03-14 16:46:48 +0000</creation_ts>
          <short_desc>ApplyFTScopeDifferentSentence/Para usage of general comparison is not right</short_desc>
          <delta_ts>2008-03-17 21:34:15 +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>Working drafts</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="zhen hua liu">zhen.liu</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>19480</commentid>
    <comment_count>0</comment_count>
    <who name="zhen hua liu">zhen.liu</who>
    <bug_when>2008-03-14 16:46:48 +0000</bug_when>
    <thetext>We have the following xquery code to define scope for different sentence. The intension here is to make sure every StringIncludeMatch pair are in different sentences unless the two pair is identical. The XQuery code uses &apos;$stringInclude1 = $stringInclude2&apos; xquery general comparsion to make the two StringInclude matches are identical. The comparsion requires xquery atomization fn:data() to apply on $stringInclude1 and $stringInclude2. However, the problem is that $stringInclude1 and $stringInclude2 are of fts:stringMatch type which is a complex type with element-only. So this will cause it to raise FOTY0012. In any case, the proper way to avoid this issue is to do use &apos;is&apos; xquery operator as &apos;$stringInclude1 is $stringInclude2&apos;. Same issue exists for ApplyFTScopeDifferentParagraph() func
declare function fts:ApplyFTScopeDifferentSentence (
      $allMatches as element(fts:allMatches) ) 
   as element(fts:allMatches) 
{
   &lt;fts:allMatches stokenNum=&quot;{$allMatches/@stokenNum}&quot;&gt;
   {
      for $match in $allMatches/fts:match
      where every $stringInclude1 in $match/fts:stringInclude,
                  $stringInclude2 in $match/fts:stringInclude  
            satisfies $stringInclude1 = $stringInclude2
                  or $stringInclude1/fts:tokenInfo/@endSent &lt;
                     $stringInclude2/fts:tokenInfo/@startSent
                  or $stringInclude2/fts:tokenInfo/@endSent &lt;
                     $stringInclude1/fts:tokenInfo/@startSent</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19505</commentid>
    <comment_count>1</comment_count>
    <who name="Mary Holstege">holstege</who>
    <bug_when>2008-03-17 19:36:37 +0000</bug_when>
    <thetext>Agreed.  Fixed as proposed. Please close this bug if you are satisfied with
the resolution.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19519</commentid>
    <comment_count>2</comment_count>
    <who name="zhen hua liu">zhen.liu</who>
    <bug_when>2008-03-17 21:34:15 +0000</bug_when>
    <thetext>ok with the resolution.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>