Sophie

Sophie

distrib > Mandriva > 2010.0 > x86_64 > media > main-release > by-pkgid > 71fef6b9bbd764d1491dbe60964943fb > files > 188

lib64sablotron-devel-1.0.3-7mdv2010.0.x86_64.rpm

<html><head><link rel=StyleSheet href='api-content.css' TYPE='text/css' MEDIA='screen'><title>SXP_query</title>
<script>
function navToEntry(entry) {
  window.location.href='api-' + entry + '.html';
}
function navToGroup(group) {
  var f = parent.frames['toc-container'];
  if (!f)
    window.open ('sparse-toc.html#' + group, 'toc_container');
  else {
    if (f.location.href.search('abc') != -1)
        f.location.href = 'sparse-toc.html#' + group;
    else
        f.location.hash = group;
  }
}
</script>
</head><body bgcolor='white'>
<!--
  -- HEADS UP!  This page was *GENERATED* by APIDOC,
  -- DO NOT EDIT THIS FILE BY HAND!
  -- See http://www.mozilla.org/projects/apidoc for information on APIDOC
  -- The original source file was sxp.xml
  -->
<h1 class='title'>SXP Reference</h1>
<center><table class='api-entry' width='100%' cellspacing='0'border='1' cellpadding='10'>
<tr><td class='entry-heading'>
<table class='entry-heading-table' width='100%' cellpadding='5'cellspacing='0'><tr>
<td class='entry-title' valign='center'><font size='+5'>SXP_query</font></td>
<td class='entry-type' align='center' width='25%'>Functions</td>
</tr></table>
</td></tr>
<tr><td class='entry-syntax'>
<h4 class='entry-subhead'>Syntax</h4><pre>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SXP_query(Q, query, node, position, size)
</pre>
<center><table class='param-list' border='1' cellpadding='3' cellspacing='1'><tr class='param-list-head'><th>Name</th><th>Type</th><th>Description</th></tr>
<tr class='param-row-even'><td class='param-name'><code>Q</code></td><td param-type'><code><a href='javascript:navToEntry("QueryContext");'>QueryContext</a></code></td><td class='param-desc'>The current query context.
</td>
</tr>
<tr class='param-row-odd'><td class='param-name'><code>query</code></td><td param-type'><code>const SXP_char*</code></td><td class='param-desc'>The text of the query.
</td>
</tr>
<tr class='param-row-even'><td class='param-name'><code>node</code></td><td param-type'><code><a href='javascript:navToEntry("SXP_Node");'>SXP_Node</a></code></td><td class='param-desc'>The current node for the query.
</td>
</tr>
<tr class='param-row-odd'><td class='param-name'><code>position</code></td><td param-type'><code>int</code></td><td class='param-desc'>The position of the current node in the evaluation context. As SXP
is a C interface, the position is zero-based (unlike one-based
XPath nodesets). Thus, you must set this parameter to 0 if you want 
the "position()" query to return 1.
</td>
</tr>
<tr class='param-row-even'><td class='param-name'><code>size</code></td><td param-type'><code>int</code></td><td class='param-desc'>The size of the evaluation context.
</td>
</tr>
<tr class='param-row-odd'><td class='param-name'><code>(RET)</code></td><td param-type'><code>int</code></td><td class='param-desc'>The error code.
</td>
</tr>
</table></center>
</td></tr>
<tr><td class='entry-description'>
<h4 class='entry-subhead'>Description</h4>
Evaluates a query (given as text) based on the current node, the
context position (zero-based) and the context size. Any namespaces
declared using <code><a href='javascript:navToEntry("SXP_addNamespaceDeclaration");'>SXP_addNamespaceDeclaration</a></code> are used for the
evaluation, as are the variable bindings made using functions like
<code><a href='javascript:navToEntry("SXP_addVariableString");'>SXP_addVariableString</a></code>. Upon completion of the query, the
pending namespace declarations and variable bindings are <b>cleared</b>.
</td></tr>
<tr><td class='entry-example'>
<h4 class='entry-subhead'>Example</h4>
<pre>&nbsp;&nbsp;SXP_query(Q, "node[1]/@att", root, 0, 1);
</pre></td></tr>
<tr><td class='entry-seealso'>
<h4 class='entry-subhead'>See Also</h4>
<table class='seealso-table'>
<tr class='seealso-groups'><td>Groups</td>
<td>[ <a href='javascript:navToGroup("GROUP_Functions")'>Functions</a> ]</td></tr>
<tr class='seealso-internals'><td>Entries</td>
<td>[ <a href='javascript:navToEntry("QueryContext");'>QueryContext</a> | <a href='javascript:navToEntry("SXP_Node");'>SXP_Node</a> | <a href='javascript:navToEntry("SXP_addNamespaceDeclaration");'>SXP_addNamespaceDeclaration</a> | <a href='javascript:navToEntry("SXP_addVariableString");'>SXP_addVariableString</a> | <a href='javascript:navToEntry("SXP_getResultString");'>SXP_getResultString</a> | <a href='javascript:navToEntry("SXP_getResultType");'>SXP_getResultType</a> ]</td></tr>

</table>
</td></tr>
</table></center><br>
&copy; 2001-2003 Ginger Alliance<BR><i>revision 03-01-31</i><BR>
<center>This page was generated by <a href='http://www.mozilla.org/projects/apidoc' target='other_window'><b>APIDOC</b></a></center>
</body></html>