Changes

Jump to navigation Jump to search
1,016 bytes added ,  13:59, 16 May 2012
Note that BaseX doesn't support the ignore option
A query such as <code>//p[. contains text 'real text']</code> will then match the example paragraph above.
Note that the node structure is completely ignored by the full-text tokenizer: the The {{Mono|contains text}} expression applies all full-text operations to the ''string value'' of its left operand. As a consequence, the <code>ft:mark</code> and <code>ft:extract</code> functions (see [[Full-Text Module|Full-Text Functions]]) will only yield useful results if they are applied to single text nodes, as the following example demonstrates:
<pre class="brush:xquery">
ft:mark(//p[.//text() contains text 'real'])
</pre>
 
Note that BaseX does '''not''' support the ''ignore option'' (<code>without content</code>) of the [http://www.w3.org/TR/xpath-full-text-10/#ftignoreoption W3C XQuery Full Text 1.0] Recommendation. This means that it is not possible to ignore descendant element content, such as footnotes or other material that does not belong to the same logical text flow. Here is an example document:
 
<pre class="brush:xml">
<p>This text is provided for illustrative<note>Serving as an example or explanation.</note> purposes only.</p>
</pre>
 
The ignore option would enable you to search for <code>illustrative purposes</code>:
 
<pre class="brush:xquery">
//p[. contains text 'illustrative purposes' without content note]
</pre>
 
For more examples, see [http://www.w3.org/TR/xpath-full-text-10-use-cases/#Ignore XQuery and XPath Full Text 1.0 Use Cases].
 
As BaseX does not support the ignore option, it raises error [[XQuery_Errors#Full-Text_Errors|FTST0007]] when it encounters a <code>without content</code> expression.
==Functions==
editor, reviewer
10

edits

Navigation menu