IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
<p>API for the XML Path Language implementation XML Path Language implementation XPath is a language for addressing parts of an XML document, designed to be used by both XSLT and XPointer</p>
int <ahref="#xmlXPathContextSetCache">xmlXPathContextSetCache</a> (<ahref="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> int active, <br/> int value, <br/> int options);
typedef int <ahref="#xmlXPathConvertFunc">xmlXPathConvertFunc</a> (<ahref="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj, <br/> int type);
typedef void <ahref="#xmlXPathFunction">xmlXPathFunction</a> (<ahref="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs);
int <ahref="#xmlXPathCmpNodes">xmlXPathCmpNodes</a> (<ahref="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node1, <br/><ahref="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node2);
</pre><p>Implement a functionality similar to the DOM NodeList.length. Returns the number of nodes in the node-set.</p><divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr></tbody></table></div>
</pre><p>Checks whether @ns is empty or not. Returns %TRUE if @ns is an empty node-set.</p><divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr></tbody></table></div>
</pre><p>Implements a functionality similar to the DOM NodeList.item(). Returns the <ahref="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> at the given @index in @ns or NULL if @index is out of range (0 to length-1)</p><divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr><tr><td><spanclass="term"><i><tt>index</tt></i>:</span></td><td>index of a node in the set</td></tr></tbody></table></div>
<divclass="refsect2"lang="en"><h3><aname="xmlXPathAxisFunc"/>Function type xmlXPathAxisFunc</h3><preclass="programlisting"><ahref="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> xmlXPathAxisFunc (<ahref="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/><ahref="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> cur)<br/>
</pre><p>An axis traversal function. To traverse an axis, the engine calls the first time with cur == NULL and repeat until the function returns NULL indicating the end of the axis traversal.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath interpreter context</td></tr><tr><td><spanclass="term"><i><tt>cur</tt></i>:</span></td><td>the previous node being explored on that axis</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the next node in that axis or NULL if at the end of the axis.</td></tr></tbody></table></div></div>
<hr/>
<divclass="refsect2"lang="en"><h3><aname="xmlXPathConvertFunc"/>Function type xmlXPathConvertFunc</h3><preclass="programlisting">int xmlXPathConvertFunc (<ahref="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> obj, <br/> int type)<br/>
</pre><p>A conversion function is associated to a type and used to cast the new type to primitive values.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>obj</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><spanclass="term"><i><tt>type</tt></i>:</span></td><td>the number of the target type</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise</td></tr></tbody></table></div></div>
<hr/>
<divclass="refsect2"lang="en"><h3><aname="xmlXPathEvalFunc"/>Function type xmlXPathEvalFunc</h3><preclass="programlisting">void xmlXPathEvalFunc (<ahref="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
</pre><p>An XPath evaluation function, the parameters are on the XPath context stack.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath parser context</td></tr><tr><td><spanclass="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments passed to the function</td></tr></tbody></table></div></div>
</pre><p>Prototype for callbacks used to plug function lookup in the XPath engine.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath context</td></tr><tr><td><spanclass="term"><i><tt>name</tt></i>:</span></td><td>name of the function</td></tr><tr><td><spanclass="term"><i><tt>ns_uri</tt></i>:</span></td><td>the namespace name hosting this function</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the XPath function or NULL if not found.</td></tr></tbody></table></div></div>
<hr/>
<divclass="refsect2"lang="en"><h3><aname="xmlXPathFunction"/>Function type xmlXPathFunction</h3><preclass="programlisting">void xmlXPathFunction (<ahref="libxml2-xpath.html#xmlXPathParserContextPtr">xmlXPathParserContextPtr</a> ctxt, <br/> int nargs)<br/>
</pre><p>An XPath function. The arguments (if any) are popped out from the context stack and the result is pushed on the stack.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath interprestation context</td></tr><tr><td><spanclass="term"><i><tt>nargs</tt></i>:</span></td><td>the number of arguments</td></tr></tbody></table></div></div>
</pre><p>Prototype for callbacks used to plug variable lookup in the XPath engine.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath context</td></tr><tr><td><spanclass="term"><i><tt>name</tt></i>:</span></td><td>name of the variable</td></tr><tr><td><spanclass="term"><i><tt>ns_uri</tt></i>:</span></td><td>the namespace name hosting this variable</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the XPath object value or NULL if not found.</td></tr></tbody></table></div></div>
</pre><p>Converts a boolean to its number value</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>val</tt></i>:</span></td><td>a boolean</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number value</td></tr></tbody></table></div></div>
</pre><p>Converts a node-set to its number value</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ns</tt></i>:</span></td><td>a node-set</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number value</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>node</tt></i>:</span></td><td>a node</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number value</td></tr></tbody></table></div></div>
</pre><p>Converts a string to its number value</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>val</tt></i>:</span></td><td>a string</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number value</td></tr></tbody></table></div></div>
</pre><p>Converts an XPath object to its number value</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number value</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the allocated string value of the object, NULL in case of error. It's up to the caller to free the string memory with xmlFree().</td></tr></tbody></table></div></div>
</pre><p>Compare two nodes w.r.t document order</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>node1</tt></i>:</span></td><td>the first node</td></tr><tr><td><spanclass="term"><i><tt>node2</tt></i>:</span></td><td>the second node</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>-2 in case of error 1 if first point < second point, 0 if it's the same node, -1 otherwise</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the <ahref="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> resulting from the compilation or NULL. the caller has to free the object.</td></tr></tbody></table></div></div>
</pre><p>Evaluate the Precompiled XPath expression in the given context.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>comp</tt></i>:</span></td><td>the compiled XPath expression</td></tr><tr><td><spanclass="term"><i><tt>ctx</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the <ahref="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> resulting from the evaluation or NULL. the caller has to free the object.</td></tr></tbody></table></div></div>
</pre><p>Applies the XPath boolean() function on the result of the given compiled expression.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>comp</tt></i>:</span></td><td>the compiled XPath expression</td></tr><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the expression evaluated to true, 0 if to false and -1 in API and internal errors.</td></tr></tbody></table></div></div>
<divclass="refsect2"lang="en"><h3><aname="xmlXPathContextSetCache"/>xmlXPathContextSetCache ()</h3><preclass="programlisting">int xmlXPathContextSetCache (<ahref="libxml2-xpath.html#xmlXPathContextPtr">xmlXPathContextPtr</a> ctxt, <br/> int active, <br/> int value, <br/> int options)<br/>
</pre><p>Creates/frees an object cache on the XPath context. If activates XPath objects (xmlXPathObject) will be cached internally to be reused. @options: 0: This will set the XPath object caching: @value: This will set the maximum number of XPath objects to be cached per slot There are 5 slots for: node-set, string, number, boolean, and misc objects. Use <0 for the default number (100). Other values for @options have currently no effect.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><spanclass="term"><i><tt>active</tt></i>:</span></td><td>enables/disables (creates/frees) the cache</td></tr><tr><td><spanclass="term"><i><tt>value</tt></i>:</span></td><td>a value with semantics dependant on @options</td></tr><tr><td><spanclass="term"><i><tt>options</tt></i>:</span></td><td>options (currently only the value 0 is used)</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the setting succeeded, and -1 on API or internal errors.</td></tr></tbody></table></div></div>
</pre><p>Converts an existing object to its boolean() equivalent</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the new object, the old one is freed (or the operation is done directly on @val)</td></tr></tbody></table></div></div>
</pre><p>Converts an existing object to its number() equivalent</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the new object, the old one is freed (or the operation is done directly on @val)</td></tr></tbody></table></div></div>
</pre><p>Converts an existing object to its string() equivalent</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>val</tt></i>:</span></td><td>an XPath object</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the new object, the old one is freed (or the operation is done directly on @val)</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>an XPath context</td></tr><tr><td><spanclass="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the <ahref="libxml2-xpath.html#xmlXPathCompExprPtr">xmlXPathCompExprPtr</a> resulting from the compilation or NULL. the caller has to free the object.</td></tr></tbody></table></div></div>
</pre><p>Evaluate the XPath Location Path in the given context.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><spanclass="term"><i><tt>ctx</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the <ahref="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> resulting from the evaluation or NULL. the caller has to free the object.</td></tr></tbody></table></div></div>
</pre><p>Evaluate the XPath expression in the given context.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>str</tt></i>:</span></td><td>the XPath expression</td></tr><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the <ahref="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> resulting from the evaluation or NULL. the caller has to free the object.</td></tr></tbody></table></div></div>
</pre><p>Evaluate a predicate result for the current node. A PredicateExpr is evaluated by evaluating the Expr and converting the result to a boolean. If the result is a number, the result will be converted to true if the number is equal to the position of the context node in the context node list (as returned by the position function) and will be converted to false otherwise; if the result is not a number, then the result will be converted as if by a call to the boolean function.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>the XPath context</td></tr><tr><td><spanclass="term"><i><tt>res</tt></i>:</span></td><td>the Predicate Expression evaluation result</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>1 if predicate is true, 0 otherwise</td></tr></tbody></table></div></div>
</pre><p>Free up an <ahref="libxml2-xpath.html#xmlXPathContext">xmlXPathContext</a></p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>ctxt</tt></i>:</span></td><td>the context to free</td></tr></tbody></table></div></div>
</pre><p>Free the NodeSet compound (not the actual nodes !).</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>obj</tt></i>:</span></td><td>the <ahref="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> to free</td></tr></tbody></table></div></div>
</pre><p>Free up the <ahref="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> @obj but don't deallocate the objects in the list contrary to xmlXPathFreeObject().</p>
</pre><p>Free up an <ahref="libxml2-xpath.html#xmlXPathObjectPtr">xmlXPathObjectPtr</a> object.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>obj</tt></i>:</span></td><td>the object to free</td></tr></tbody></table></div></div>
</pre><p>Provides a portable isinf() function to detect whether a double is a +Infinite or -Infinite. Based on trio code http://sourceforge.net/projects/ctrio/</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>val</tt></i>:</span></td><td>a double value</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>1 vi the value is +Infinite, -1 if -Infinite, 0 otherwise</td></tr></tbody></table></div></div>
</pre><p>Provides a portable isnan() function to detect whether a double is a NotaNumber. Based on trio code http://sourceforge.net/projects/ctrio/</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>val</tt></i>:</span></td><td>a double value</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the value is a NaN, 0 otherwise</td></tr></tbody></table></div></div>
</pre><p>Create a new <ahref="libxml2-xpath.html#xmlXPathContext">xmlXPathContext</a></p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>doc</tt></i>:</span></td><td>the XML document</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the <ahref="libxml2-xpath.html#xmlXPathContext">xmlXPathContext</a> just allocated. The caller will need to free it.</td></tr></tbody></table></div></div>
</pre><p>Create a new <ahref="libxml2-xpath.html#xmlNodeSetPtr">xmlNodeSetPtr</a> of type double and of value @val</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>val</tt></i>:</span></td><td>an initial xmlNodePtr, or NULL</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
</pre><p>allocate a new copy of a given object</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>val</tt></i>:</span></td><td>the original object</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the newly created object.</td></tr></tbody></table></div></div>
</pre><p>Call this routine to speed up XPath computation on static documents. This stamps all the element nodes with the document order Like for line information, the order is kept in the element->content field, the value stored is actually - the node number (starting at -1) to be able to differentiate from line numbers.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>doc</tt></i>:</span></td><td>an input document</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements found in the document or -1 in case of error.</td></tr></tbody></table></div></div>