[Bug 5829] [FTUC] xquery full text use case document has WRONG xpath solutions

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


Pat Case <pcase@crs.loc.gov> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pcase@crs.loc.gov




--- Comment #7 from Pat Case <pcase@crs.loc.gov>  2008-08-11 14:13:56 ---
First installment of XQuery solutions rewritten without count().  Sections
2-10. Sections 11-17 to follow. Pat Case

2.2.4 Q4 Query in Different Elements
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $title := $book/(metadata|content/part/chapter)/title
where $title ftcontains "usability tests"
return $book

2.2.6 Q6 Starts-with Query
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $title := $book/metadata/title 
where $title ftcontains "improving" ftand "usability" 
   ordered distance at most 2 words at start
return $title

2.2.7 Q7 Entire Element Content Query
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $exactTitle := $book/metadata/title
where $exactTitle ftcontains "improv.* the usability of a 
   web site through expert reviews and usability testing" 
   with wildcards entire content
return $exactTitle

3.2.1 Q1 Query Across Descendant Elements (No Element Content)
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $chap := $book//chapter
where $chap ftcontains "one of the best known lists of 
   heuristics is Ten Usability Heuristics"
return $book

3.2.2 Q2 Query Across Descendant Elements (Highlighting Tags)
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $intro := $book/content/part/introduction
where $intro ftcontains "prototypes"
return $book

3.2.3 Q3 Query Across Descendant Elements (Substantive Tags)
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $cont := $book/content
where $cont ftcontains "tests"
return $book

3.2.4 Q4 Query Across Siblings
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $cont := $book//content 
where $cont ftcontains "usability testing once the 
   problems"
return $book

3.2.5 Q5 Query in Different Sub-Trees
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $intro := $book/content/(introduction|part/introduction)   
where $intro [./p ftcontains "identif.*" with wildcards
return $book

3.2.6 Q6 Query on Entire Document
no change

4.2.1 Q1 Query on Attribute
no change

4.2.2 Q2 Query on Element and Attribute
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $stitle := $book/metadata/title/@shortTitle    
let $cont := $book//componentTitle  
where $stitle ftcontains "manuscript guides"
   with stemming and $cont ftcontains "user profiling" 
   with stemming
return data($book/metadata/title/@shortTitle)

5.2.1 Q1 One Character Suffix Wildcard Query
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $cont := $book/content 
where $cont ftcontains "test." with wildcards
return $book

5.2.2  Q2 Zero or One Character Prefix Wildcard Query
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $cont := $book//content
where $cont ftcontains ".?way" with wildcards
return $book

5.2.3-5.2.5 done in document

6.2.1 Q1 Query Stemming on Word Root
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $cont := $book//content
where $cont ftcontains "test" with stemming
return $book

6.2.2 done in document

7.2.1 Q1 Query on Synonyms Identified by a Thesaurus
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $intro := $book//introduction 
where $intro ftcontains "quote" with thesaurus at
   "http://bstore1.example.com/UsabilityThesaurus.xml" 
   relationship "synonyms"
return $book

7.2.2 Q2 Query on Narrower Terms Identified by a Thesaurus
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $cont := $book/content
where $cont ftcontains "web site components" 
   with thesaurus at 
   "http://bstore1.example.com/UsabilityThesaurus.xml" 
   relationship "narrower terms" at most 2 levels
return $book

7.2.3 Q3 Query on Broader Terms Identified by a Thesaurus
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book[@number="3"]
let $cont := $book/content 
where $cont ftcontains 
   ("letters" ftor "holiday cards") with thesaurus at 
   "http://bstore1.example.com/UsabilityThesaurus.xml" 
   relationship "BT" exactly 1 levels
return $book

7.2.4 Q4 Query on Word Which Sounds Like Other Words
no change

7.2.5 Q5 Query on Word Spelled Similarly to Other Words
no change

7.2.6 Q6 Query on Subordinate Terms Identified by a Taxonomy
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book[@number="3"]
let $comp := $book//component
where $comp ftcontains "AIDS" uppercase with thesaurus at 
   "http://bstore1.example.com/OurTaxonomy.xml" 
   relationship "disease in this category"
return $book

8.2.1 Q1 Query on Stop Word Treated as a Stop Word
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $cont := $book//content
where $cont ftcontains "planning then conducting" 
   with stop words 
   at "http://bstore1.example.com/StopWordList.xml"
return $book

8.2.2 Q2 Query on Stop Word Not Treated as a Stop Word
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $cont := $book//content
where $cont ftcontains "planning then conducting" 
   without stop words
return $book

9.2.1 Q1 Diacritics Sensitive Query
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $cont := $book//content
where $cont ftcontains "résumé." with wildcards 
   diacritics sensitive
return $book

9.2.2 Q2 Diacritics Insensitive Query
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $cont := $book//content
where $cont ftcontains "resume." with wildcards 
   diacritics insensitive
return $book

9.2.3 Q3 Query on Word with Upper Case Characters
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book  
where $book[. ftcontains "AIDS" uppercase] 
return $book

9.2.4 Q4 Query on Word with Upper Case and Lower Case Characters
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book  
where $book ftcontains "AIDS" case insensitive
return $book

10.2.1 Q1 Or Query
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $cont := $book//content
where $cont ftcontains "web" ftor "software"
return $book

10.2.2 Q2 And Query
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $cont := $book//content
where $cont ftcontains "web" ftand "software"
return $book

10.2.3 Q3 And Query Ordered
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $cont := $book//content
where $cont ftcontains "goal" ftand "obstacles" 
   ftand "task" ordered
return $book

10.2.4 Q4 Unary Not Query
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
where $book ftcontains ftnot "us.* testing" with 
   wildcards
return $book

10.2.5 Q5 And Not Query
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $up := $book/metadata
where $up ftcontains "usability" ftand ftnot "plan"
return $book

10.2.6 Q6 And Not Query Where Second Operand Is a Subset of the First Operand
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $cont := $book/content
where $cont ftcontains ("résumés" diacritics sensitive 
   ftor "drafts" ftor "correspondence") ftand ftnot 
   "book drafts"
return $book

10.2.7 Q7 Mild Not Query Where Second Operand Is a Subset of the First Operand
for $book in doc("http://bstore1.example.com/full-text.xml")
   /books/book
let $cont := $book//content
where $cont ftcontains ("résumés" diacritics sensitive 
   ftor "drafts" ftor "correspondence") not in "book 
   drafts"
return $book


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Monday, 11 August 2008 14:14:35 UTC