W3C home > Mailing lists > Public > www-ql@w3.org > October to December 2008

FT: TokenInfo and StringInclude definition

From: Peter Pleshachkov <peter.pleshachkov@gmail.com>
Date: Thu, 11 Dec 2008 15:28:27 +0100
Message-ID: <246ce7d90812110628m50cc6436ufe5b3b5e85a55f46@mail.gmail.com>
To: www-ql@w3.org

Dear authors of XQuery Full-Text Specification,

Please clarify the following issues:

1. I am a bit confused with the definition of TokenInfo and StringInclude.

[Definition: A TokenInfo represents a contiguous collection of tokens
from an XML document. ]

[Definition: A StringInclude is a StringMatch that describes a
TokenInfo that must be contained in the document.]

 the UML Static Class diagram of AllMatches shows one-to one
correspondece between StringMatch and TokenInfo.

But from the XML Schema definition :

  <xs:element name="stringInclude"
              type="fts:stringMatch" />

  <xs:complexType name="stringMatch">
      <xs:element ref="fts:tokenInfo"/>
    <xs:attribute name="queryPos"
    <xs:attribute name="isContiguous"

  <xs:complexType name="tokenInfo">
    <xs:attribute name="startPos"
    <xs:attribute name="endPos"
    <xs:attribute name="startSent"
    <xs:attribute name="endSent"
    <xs:attribute name="startPara"
    <xs:attribute name="endPara"

  <xs:element name="tokenInfo" type="fts:tokenInfo"/>

follows that StringMatch can contain a SEQUENCE of tokenInfo. So, we
have one-to many relationship.

Please, clarify the right relationship between StringMatch and tokenInfo.

2. In section FTDistance you have an example: ("Ford Mustang"
ftand "excellent") distance at most 3 words

And you say at the end : "The result for the FTDistance selection
consists of only the first Match (with positions 1, 2, and 5) and the
fifth Match (with positions 25, 27, and 28), because only for these
Matches the word distance between consecutive TokenInfos is always
less than or equal to 3. It is 1 for the first pair and 3 for the
second in the first case, and 2 and 1 in the second."

Here for the first match you have 2 StringIncludes (shown on the diagram):
1) first StringInclude with startPos = 1 and endPos=2
2) second StringInclude with startPos = 5 (endPos = 5)

But what is the consecutive pairs ? It looks like with have 2
StringIncludes and have only ONE pair and distance = 5 - 2 -1 = 2, but
you say " It is 1 for the first pair and 3 for the second in the first
case" what defines something different.

Please, clarify how do you define the consecutive pairs ?

Thank you in advance,
Peter Pleshachkov
Received on Thursday, 11 December 2008 16:27:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:43:44 UTC