Changes

Jump to navigation Jump to search
20 bytes removed ,  21:07, 13 December 2010
no edit summary
| valign='top' | '''Examples'''
|The following query returns <code>&lt;XML&gt;&lt;mark&gt;hello&lt;/mark&gt; world&lt;/XML&gt;</code>, if one text node of the database <code>DB</code> has the value "hello world":<br />
<code>ft:mark(db:open('DB')//*[text() contains text 'hello'])</code><br />The following expression returns <code>&lt;p&gt;&lt;b&gt;word&lt;/b&gt;&lt;/p&gt;</code>:<br /> <code>copy $p := &lt;p&gt;word&lt;/p&gt;</code><br /> <code>modify ()</code><br /> <code>return ft:mark($p[text() contains text 'word'], 'b')</code><br />
|-
| valign='top' | '''Errors'''
| valign='top' | '''Examples'''
|The following query may return <code>&lt;XML&gt;...&lt;b&gt;hello&lt;/b&gt;...&lt;XML&gt;</code> if a text node of the database <code>DB</code> contains the string "hello world":<br />
<code>ft:extract(db:open('DB')//*[text() contains text 'hello'], 'b', 1)</code><br />
|-
| valign='top' | '''Errors'''
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu