Changes

Jump to navigation Jump to search
699 bytes added ,  14:34, 24 June 2011
Issue #118: added documentation for db:text(), db:attribute(), and db:fulltext()
|-
| valign='top' width='90' | '''Signatures'''
|<code><b>db:text</b>($string as item()) as text()*</code> <font color="red">Version &lt; 6.7</font><br/><code><b>db:text</b>($name as xs:string, $string as item()) as text()*</code> <font color="red">Version 6.7</font>
|-
| valign='top' | '''Summary'''
|-
| valign='top' | '''Errors'''
|<b>[[XQuery Errors#BaseX Errors (BASX)|BASX0001]]</b> is raised if the index is not available.<br/><b>[[XQuery Errors#BaseX Errors (BASX)|BASX0002]]</b> is raised if the context item does not represent a database node.<font color="red">Version &lt; 6.7</font>
|-
| valign='top' | '''Examples'''
|
* <code>db:text("QUERY")</code> returns all text nodes of the currently opened database that match the string <code>QUERY</code>.* <code>db:open("DB")/db:text(, "QUERY")/..</code> returns the parents of all text nodes of the database <code>DB</code> that match the string <code>QUERY</code>.
|}
|-
| valign='top' width='90' | '''Signatures'''
|<code><b>db:attribute</b>($string as item()) as attribute()*</code> <font color="red">Version &lt; 6.7</font><br/><code><b>db:attribute</b>($string as item(), $attname as xs:string) as attribute()*</code> <font color="red">Version &lt; 6.7</font><br/><code><b>db:attribute</b>($name as xs:string, $string as item()) as attribute()*</code> <font color="red">Version 6.7</font><br/><code><b>db:attribute</b>($name as xs:string, $string as item(), $attname as xs:string) as attribute()*</code> <font color="red">Version 6.7</font>
|-
| valign='top' | '''Summary'''
|Returns all attribute nodes from the attribute index that have <code>$string</code> as their string value.<br />If <code>$nameattname</code> is specified, the resulting attribute nodes are filtered by their attribute name.
|-
| valign='top' | '''Errors'''
|<b>[[XQuery Errors#BaseX Errors (BASX)|BASX0001]]</b> is raised if the index is not available.<br/><b>[[XQuery Errors#BaseX Errors (BASX)|BASX0002]]</b> is raised if the context item does not represent a database node.<font color="red">Version &lt; 6.7</font>
|-
| valign='top' | '''Examples'''
|
* <code>db:openattribute("DB")/db:attribute(, "QUERY", "id")/..</code> returns the parents of all <code>id</code> attribute nodes of the database <code>DB</code> that have <code>QUERY</code> as string value.
|}
|-
| valign='top' width='90' | '''Signatures'''
|<code><b>db:fulltext</b>($text as xs:string) as text()</code> <font color="red">Version &lt; 6.7</font><br/><code><b>db:fulltext</b>($name as xs:string, $text as xs:string) as text()</code> <font color="red">Version 6.7</font>
|-
| valign='top' | '''Summary'''
|-
| valign='top' | '''Errors'''
|<b>[[XQuery Errors#BaseX Errors (BASX)|BASX0001]]</b> is raised if the index is not available.<br/><b>[[XQuery Errors#BaseX Errors (BASX)|BASX0002]]</b> is raised if the context item does not represent a database node. <font color="red">Version &lt; 6.7</font>
|-
| valign='top' | '''Examples'''
|
* <code>db:fulltext("DB", "QUERY")</code> returns all text nodes of the currently opened database <code>DB</code> that contain the string <code>QUERY</code>.
|}
administrator, Bureaucrats, editor, reviewer, Administrators
98

edits

Navigation menu