This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Dear authors, In the spec. you say that token is a none-empty string of characters. But if I have the following query : <p>petr</p>[. ftcontains ""] What is the result of this query ? And what is the result for this query <p>petr </p>[. ftcontains "petr" ftand ""] Kind regards, Petr
We have added wording to section 3.2 "Search Tokens and Phrases" to clarify various edge cases, including these. In both queries, the StringLiteral "" is an FTWordsValue, which evaluates to a single xs:string value, namely the empty string, which is then tokenized, presumably into an empty sequence of tokens. The associated FTAnyallOption is omitted, which is equivalent to 'any'. The relevant wording is now: If FTAnyallOption is "any", the sequence of tokens for each string is considered as a phrase. If the sequence of tokens is empty, then the phrase contributes nothing to the set of matches for the FTWords. So the empty string (with its empty sequence of tokens) contributes no matches, and there are no other strings in the value of the FTWordsValue, so the whole FTWords yields no matches. Propagating up from there, the FTContainsExpr yields false, so the query yields the empty sequence. We believe that the indicated wording change resolves this issue, so I am marking it resolved-FIXED. If you agree, please mark it CLOSED.