This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
We have the following xquery code to define scope for different sentence. The intension here is to make sure every StringIncludeMatch pair are in different sentences unless the two pair is identical. The XQuery code uses '$stringInclude1 = $stringInclude2' xquery general comparsion to make the two StringInclude matches are identical. The comparsion requires xquery atomization fn:data() to apply on $stringInclude1 and $stringInclude2. However, the problem is that $stringInclude1 and $stringInclude2 are of fts:stringMatch type which is a complex type with element-only. So this will cause it to raise FOTY0012. In any case, the proper way to avoid this issue is to do use 'is' xquery operator as '$stringInclude1 is $stringInclude2'. Same issue exists for ApplyFTScopeDifferentParagraph() func declare function fts:ApplyFTScopeDifferentSentence ( $allMatches as element(fts:allMatches) ) as element(fts:allMatches) { <fts:allMatches stokenNum="{$allMatches/@stokenNum}"> { for $match in $allMatches/fts:match where every $stringInclude1 in $match/fts:stringInclude, $stringInclude2 in $match/fts:stringInclude satisfies $stringInclude1 = $stringInclude2 or $stringInclude1/fts:tokenInfo/@endSent < $stringInclude2/fts:tokenInfo/@startSent or $stringInclude2/fts:tokenInfo/@endSent < $stringInclude1/fts:tokenInfo/@startSent
Agreed. Fixed as proposed. Please close this bug if you are satisfied with the resolution.
ok with the resolution.