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 4972 - [FTUseCase] wrong scope usage in use case XQuery-XPath-Composability
Summary: [FTUseCase] wrong scope usage in use case XQuery-XPath-Composability
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Full Text 1.0 (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: 2007-08-20 17:23 UTC by Chavdar Botev
Modified: 2008-02-11 20:00 UTC (History)
0 users

See Also:


Attachments

Description Chavdar Botev 2007-08-20 17:23:32 UTC
See http://lists.w3.org/Archives/Member/member-query-fttf/2007Aug/0018.html

*5) Use Case XQuery-XPath-Composability *

Q2 Full-Text Query Returning Count of Descendant Element Occurrences
wrong scope usage: title is already out of scope
Suggestion: $title is bound in for, but second usage of $title is after the flowr

<number-of-steps>
{count($title/..//step)}
</number-of-steps>

Q7 Full-Text Query with Date Comparison and Element Occurrence Count
wrong scope usage: in the predicates [] $book is not yet bound/in scope
Suggestion: replace $book in binding path with .

for $book in doc("FTTests/Files/sample_data.xml")
/books/book
[(($book/metadata/publicationInfo/dateIssued > "2000-12-31")
Comment 1 Pat Case 2007-10-02 13:13:15 UTC
As Use Case editor I thank the submitters for this and other bugs submitted addressing the FT Use Cases. Your careful review is greatly appreciated. 

This bug has 2 parts:

1) This bug correctly states there is wrong scope usage: title is already out of scope. We have made the following modifications to the return statement for 16.2.2 Q2 Full-Text Query Returning Count of Descendant Element Occurrences:
return <book number="{$book/@number}"> 
          {$book/metadata/title,
          for $title in $ct
          return 
             ($title, 
             <number-of-steps> 
                {count($title/..//step)}
             </number-of-steps>)}
       </book>

2) This bug correctly states that in the predicates [] $book is not yet bound/in scope and should be replaced with ".". We have made the following modifications to the predicates in Q7 Full-Text Query with Date Comparison and Element Occurrence Count:
   [((./metadata/publicationInfo/dateIssued > "2000-12-31") 
   or (./metadata/publicationInfo/dateRevised > "2000-12-31")) 
   and count(./metadata/author) > 1]

The Full Text Task Force agreed to modify the use cases as cited above. These modifications have been made in the October 1 internal version and will appear in the next public version. If the submitters agree with the modifications, please mark this bug closed.