Changes

Jump to navigation Jump to search
5 bytes added ,  00:08, 6 May 2014
no edit summary
|-
| width='120' | '''Signatures'''
|{{Func|ft:mark|$nodes as node()*|node()*}}<br />{{Func|ft:mark|$nodes as node()*, $tag name as xs:string|node()*}}
|-
| '''Summary'''
|Puts a marker element around the resulting {{Code|$nodes}} of a full-text index request.<br />The default tag name of the marker element is {{Code|mark}}. An alternative tag name can be chosen via the optional {{Code|$tagname}} argument.<br />Please note that:
* the XML node to be transformed must be an internal "database" node. The {{Code|transform}} expression can be used to apply the method to a main-memory fragment, as shown in Example 2.
* the full-text expression, which computes the token positions, must be specified within <code>ft:mark()</code> function, as all position information is lost in subsequent processing steps. You may need to specify more than one full-text expression if you want to use the function in a FLWOR expression, as shown in Example 3.
|-
| width='120' | '''Signatures'''
|{{Func|ft:extract|$nodes as node()*|node()*}}<br />{{Func|ft:extract|$nodes as node()*, $tag name as xs:string|node()*}}<br />{{Func|ft:extract|$nodes as node()*, $tag name as xs:string, $length as xs:integer|node()*}}
|-
| '''Summary'''
|Extracts and returns relevant parts of full-text results. It puts a marker element around the resulting {{Code|$nodes}} of a full-text index request and chops irrelevant sections of the result.<br />The default tag name of the marker element is {{Code|mark}}. An alternative tag name can be chosen via the optional {{Code|$tagname}} argument.<br />The default length of the returned text is {{Code|150}} characters. An alternative length can be specified via the optional {{Code|$length}} argument. Note that the effective text length may differ from the specified text due to formatting and readibility issues.<br />For more details on this function, please have a look at [[#ft:mark|ft:mark]].
|-
| '''Examples'''
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu