Tamino XML Server Version 9.7
 —  XQuery 4 Reference Guide  —

tf:highlight

Highlight text based on reference descriptions.


Syntax

tf:highlight(node $node, node $description, string $markerString) => node*

Top of page

Description

The function tf:highlight is specific to Tamino. It takes a sequence of nodes, a sequence of reference descriptions and a marker string as arguments and returns $node along with any text or nodes, for which a reference description has been created, as enclosed between processing instructions (PIs).

The PIs are used to mark the highlighted text. They have the following format: The PI target is always $markerString. It is followed by either "+" or "-", indicating start and end of the highlighted token. The subsequent number is the current number of highlights in the result document.

If $markerString is empty, the string "Tamino-Highlighting" is used.

Top of page

Arguments

$node

node in which the search takes place

$description

a reference description

$markerString

a string value

Top of page

Examples

In the patient sample data, there is a remarks element for the patient Bloggs that reads: "Patient is responding to treatment. Dr. Shamir.". This remark should serve as example text here.

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:

Top of page