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 5855 - xquery full text use case 15.2.4 solution is not correct
Summary: xquery full text use case 15.2.4 solution is not correct
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Full Text 1.0 Use Cases (show other bugs)
Version: Working drafts
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Pat Case
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-10 23:25 UTC by zhen hua liu
Modified: 2011-01-07 00:09 UTC (History)
1 user (show)

See Also:


Attachments

Description zhen hua liu 2008-07-10 23:25:45 UTC
The solution 
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $au := $book/metadata/author[. ftcontains ftnot ("montana" 
  ftand "marigold")]   
let $co := $book//content[. ftcontains (("correct" 
   ftor ("comment" with stemming) ftor "guidance" ftor "assistance" 
   ftor "help") ftand "usability test.*" with wildcards) 
   window 70 words without content .//footnote]
where count($au) > 0 and  count($co) > 0 
return <book number="{$book/@number}"> 
          {$book/metadata/title,
          $book//content}
       </book>

can NOT get the expected result, which is <book number="2> element because
for <book number="2"> element, it does NOT have metadata/author element, so
$au is zero item sequence and thus 'where count($au) > 0' is false.
If take out the condition 'count($au) >0',  it is still not correct because
the window 70 words is too small, it shall be 75 words.
Comment 1 Pat Case 2008-07-14 19:36:21 UTC
Zhen,

I handled this as editorial.

I removed the count($au) > 0 clause and increased the window size to 80.

The correction will appear internally after the next use cases build. I will
send the FTTF an alert when it is ready. 

Please review and if you agree with the change, close the bug.

Pat