Tamino XML Server Version 9.7
 —  XQuery 4 Reference Guide  —

tf:containsAdjacentText

Search word tokens in order within some distance.


Syntax

tf:containsAdjacentText(node $input, integer $distance, token+ $word) => boolean

Top of page

Description

The function tf:containsAdjacentText is specific to Tamino. It searches a node for a sequence of one or more word tokens within a specified proximity distance and in token order. If the argument $node evaluates to the empty sequence, false is returned.

The $distance argument determines how far apart the matched word tokens in the node may be. The distance is evaluated as the maximum number of unmatched tokens between the first matched word token and the last matched word token. The function returns true, if $distance is larger than this computed distance. For example, a value of "1" means they must follow immediately after one another, a value of 2 allows a gap of one word in between etc.

With tf:containsAdjacentText you can perform search operations including the use of a wildcard character. The section Pattern Matching in the XQuery 4 User Guide explains this in detail.

Top of page

Arguments

$input

node to be searched

$distance

integer value denoting proximity distance

$word

a word token

Top of page

Examples

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:

Top of page