version 1.1.1.2, 2013/07/22 01:22:22
|
version 1.1.1.3, 2014/06/15 19:53:38
|
Line 33
|
Line 33
|
extern "C" { |
extern "C" { |
#endif |
#endif |
#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED */ |
#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED */ |
| |
#ifdef LIBXML_XPATH_ENABLED |
#ifdef LIBXML_XPATH_ENABLED |
|
|
typedef struct _xmlXPathContext xmlXPathContext; |
typedef struct _xmlXPathContext xmlXPathContext; |
Line 69 typedef enum {
|
Line 69 typedef enum {
|
XPATH_ENCODING_ERROR, |
XPATH_ENCODING_ERROR, |
XPATH_INVALID_CHAR_ERROR, |
XPATH_INVALID_CHAR_ERROR, |
XPATH_INVALID_CTXT, |
XPATH_INVALID_CTXT, |
XPATH_STACK_ERROR | XPATH_STACK_ERROR, |
| XPATH_FORBID_VARIABLE_ERROR |
} xmlXPathError; |
} xmlXPathError; |
|
|
/* |
/* |
Line 272 typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (vo
|
Line 273 typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (vo
|
* |
* |
* Expression evaluation occurs with respect to a context. |
* Expression evaluation occurs with respect to a context. |
* he context consists of: |
* he context consists of: |
* - a node (the context node) | * - a node (the context node) |
* - a node list (the context node list) | * - a node list (the context node list) |
* - a set of variable bindings | * - a set of variable bindings |
* - a function library | * - a function library |
* - the set of namespace declarations in scope for the expression | * - the set of namespace declarations in scope for the expression |
* Following the switch to hash tables, this need to be trimmed up at |
* Following the switch to hash tables, this need to be trimmed up at |
* the next binary incompatible release. |
* the next binary incompatible release. |
* The node may be modified when the context is passed to libxml2 |
* The node may be modified when the context is passed to libxml2 |
Line 420 XMLPUBVAR double xmlXPathNINF;
|
Line 421 XMLPUBVAR double xmlXPathNINF;
|
* @index is out of range (0 to length-1) |
* @index is out of range (0 to length-1) |
*/ |
*/ |
#define xmlXPathNodeSetItem(ns, index) \ |
#define xmlXPathNodeSetItem(ns, index) \ |
((((ns) != NULL) && \ | ((((ns) != NULL) && \ |
((index) >= 0) && ((index) < (ns)->nodeNr)) ? \ |
((index) >= 0) && ((index) < (ns)->nodeNr)) ? \ |
(ns)->nodeTab[(index)] \ |
(ns)->nodeTab[(index)] \ |
: NULL) |
: NULL) |
Line 436 XMLPUBVAR double xmlXPathNINF;
|
Line 437 XMLPUBVAR double xmlXPathNINF;
|
(((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL)) |
(((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL)) |
|
|
|
|
XMLPUBFUN void XMLCALL | XMLPUBFUN void XMLCALL |
xmlXPathFreeObject (xmlXPathObjectPtr obj); |
xmlXPathFreeObject (xmlXPathObjectPtr obj); |
XMLPUBFUN xmlNodeSetPtr XMLCALL | XMLPUBFUN xmlNodeSetPtr XMLCALL |
xmlXPathNodeSetCreate (xmlNodePtr val); |
xmlXPathNodeSetCreate (xmlNodePtr val); |
XMLPUBFUN void XMLCALL | XMLPUBFUN void XMLCALL |
xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj); |
xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj); |
XMLPUBFUN void XMLCALL | XMLPUBFUN void XMLCALL |
xmlXPathFreeNodeSet (xmlNodeSetPtr obj); |
xmlXPathFreeNodeSet (xmlNodeSetPtr obj); |
XMLPUBFUN xmlXPathObjectPtr XMLCALL | XMLPUBFUN xmlXPathObjectPtr XMLCALL |
xmlXPathObjectCopy (xmlXPathObjectPtr val); |
xmlXPathObjectCopy (xmlXPathObjectPtr val); |
XMLPUBFUN int XMLCALL | XMLPUBFUN int XMLCALL |
xmlXPathCmpNodes (xmlNodePtr node1, |
xmlXPathCmpNodes (xmlNodePtr node1, |
xmlNodePtr node2); |
xmlNodePtr node2); |
/** |
/** |
* Conversion functions to basic types. |
* Conversion functions to basic types. |
*/ |
*/ |
XMLPUBFUN int XMLCALL | XMLPUBFUN int XMLCALL |
xmlXPathCastNumberToBoolean (double val); |
xmlXPathCastNumberToBoolean (double val); |
XMLPUBFUN int XMLCALL | XMLPUBFUN int XMLCALL |
xmlXPathCastStringToBoolean (const xmlChar * val); |
xmlXPathCastStringToBoolean (const xmlChar * val); |
XMLPUBFUN int XMLCALL | XMLPUBFUN int XMLCALL |
xmlXPathCastNodeSetToBoolean(xmlNodeSetPtr ns); |
xmlXPathCastNodeSetToBoolean(xmlNodeSetPtr ns); |
XMLPUBFUN int XMLCALL | XMLPUBFUN int XMLCALL |
xmlXPathCastToBoolean (xmlXPathObjectPtr val); |
xmlXPathCastToBoolean (xmlXPathObjectPtr val); |
|
|
XMLPUBFUN double XMLCALL | XMLPUBFUN double XMLCALL |
xmlXPathCastBooleanToNumber (int val); |
xmlXPathCastBooleanToNumber (int val); |
XMLPUBFUN double XMLCALL | XMLPUBFUN double XMLCALL |
xmlXPathCastStringToNumber (const xmlChar * val); |
xmlXPathCastStringToNumber (const xmlChar * val); |
XMLPUBFUN double XMLCALL | XMLPUBFUN double XMLCALL |
xmlXPathCastNodeToNumber (xmlNodePtr node); |
xmlXPathCastNodeToNumber (xmlNodePtr node); |
XMLPUBFUN double XMLCALL | XMLPUBFUN double XMLCALL |
xmlXPathCastNodeSetToNumber (xmlNodeSetPtr ns); |
xmlXPathCastNodeSetToNumber (xmlNodeSetPtr ns); |
XMLPUBFUN double XMLCALL | XMLPUBFUN double XMLCALL |
xmlXPathCastToNumber (xmlXPathObjectPtr val); |
xmlXPathCastToNumber (xmlXPathObjectPtr val); |
|
|
XMLPUBFUN xmlChar * XMLCALL | XMLPUBFUN xmlChar * XMLCALL |
xmlXPathCastBooleanToString (int val); |
xmlXPathCastBooleanToString (int val); |
XMLPUBFUN xmlChar * XMLCALL | XMLPUBFUN xmlChar * XMLCALL |
xmlXPathCastNumberToString (double val); |
xmlXPathCastNumberToString (double val); |
XMLPUBFUN xmlChar * XMLCALL | XMLPUBFUN xmlChar * XMLCALL |
xmlXPathCastNodeToString (xmlNodePtr node); |
xmlXPathCastNodeToString (xmlNodePtr node); |
XMLPUBFUN xmlChar * XMLCALL | XMLPUBFUN xmlChar * XMLCALL |
xmlXPathCastNodeSetToString (xmlNodeSetPtr ns); |
xmlXPathCastNodeSetToString (xmlNodeSetPtr ns); |
XMLPUBFUN xmlChar * XMLCALL | XMLPUBFUN xmlChar * XMLCALL |
xmlXPathCastToString (xmlXPathObjectPtr val); |
xmlXPathCastToString (xmlXPathObjectPtr val); |
|
|
XMLPUBFUN xmlXPathObjectPtr XMLCALL | XMLPUBFUN xmlXPathObjectPtr XMLCALL |
xmlXPathConvertBoolean (xmlXPathObjectPtr val); |
xmlXPathConvertBoolean (xmlXPathObjectPtr val); |
XMLPUBFUN xmlXPathObjectPtr XMLCALL | XMLPUBFUN xmlXPathObjectPtr XMLCALL |
xmlXPathConvertNumber (xmlXPathObjectPtr val); |
xmlXPathConvertNumber (xmlXPathObjectPtr val); |
XMLPUBFUN xmlXPathObjectPtr XMLCALL | XMLPUBFUN xmlXPathObjectPtr XMLCALL |
xmlXPathConvertString (xmlXPathObjectPtr val); |
xmlXPathConvertString (xmlXPathObjectPtr val); |
|
|
/** |
/** |
* Context handling. |
* Context handling. |
*/ |
*/ |
XMLPUBFUN xmlXPathContextPtr XMLCALL | XMLPUBFUN xmlXPathContextPtr XMLCALL |
xmlXPathNewContext (xmlDocPtr doc); |
xmlXPathNewContext (xmlDocPtr doc); |
XMLPUBFUN void XMLCALL |
XMLPUBFUN void XMLCALL |
xmlXPathFreeContext (xmlXPathContextPtr ctxt); |
xmlXPathFreeContext (xmlXPathContextPtr ctxt); |
Line 505 XMLPUBFUN int XMLCALL
|
Line 506 XMLPUBFUN int XMLCALL
|
/** |
/** |
* Evaluation functions. |
* Evaluation functions. |
*/ |
*/ |
XMLPUBFUN long XMLCALL | XMLPUBFUN long XMLCALL |
xmlXPathOrderDocElems (xmlDocPtr doc); |
xmlXPathOrderDocElems (xmlDocPtr doc); |
XMLPUBFUN xmlXPathObjectPtr XMLCALL | XMLPUBFUN int XMLCALL |
| xmlXPathSetContextNode (xmlNodePtr node, |
| xmlXPathContextPtr ctx); |
| XMLPUBFUN xmlXPathObjectPtr XMLCALL |
| xmlXPathNodeEval (xmlNodePtr node, |
| const xmlChar *str, |
| xmlXPathContextPtr ctx); |
| XMLPUBFUN xmlXPathObjectPtr XMLCALL |
xmlXPathEval (const xmlChar *str, |
xmlXPathEval (const xmlChar *str, |
xmlXPathContextPtr ctx); |
xmlXPathContextPtr ctx); |
XMLPUBFUN xmlXPathObjectPtr XMLCALL | XMLPUBFUN xmlXPathObjectPtr XMLCALL |
xmlXPathEvalExpression (const xmlChar *str, |
xmlXPathEvalExpression (const xmlChar *str, |
xmlXPathContextPtr ctxt); |
xmlXPathContextPtr ctxt); |
XMLPUBFUN int XMLCALL | XMLPUBFUN int XMLCALL |
xmlXPathEvalPredicate (xmlXPathContextPtr ctxt, |
xmlXPathEvalPredicate (xmlXPathContextPtr ctxt, |
xmlXPathObjectPtr res); |
xmlXPathObjectPtr res); |
/** |
/** |
* Separate compilation/evaluation entry points. |
* Separate compilation/evaluation entry points. |
*/ |
*/ |
XMLPUBFUN xmlXPathCompExprPtr XMLCALL | XMLPUBFUN xmlXPathCompExprPtr XMLCALL |
xmlXPathCompile (const xmlChar *str); |
xmlXPathCompile (const xmlChar *str); |
XMLPUBFUN xmlXPathCompExprPtr XMLCALL | XMLPUBFUN xmlXPathCompExprPtr XMLCALL |
xmlXPathCtxtCompile (xmlXPathContextPtr ctxt, |
xmlXPathCtxtCompile (xmlXPathContextPtr ctxt, |
const xmlChar *str); | const xmlChar *str); |
XMLPUBFUN xmlXPathObjectPtr XMLCALL | XMLPUBFUN xmlXPathObjectPtr XMLCALL |
xmlXPathCompiledEval (xmlXPathCompExprPtr comp, |
xmlXPathCompiledEval (xmlXPathCompExprPtr comp, |
xmlXPathContextPtr ctx); |
xmlXPathContextPtr ctx); |
XMLPUBFUN int XMLCALL | XMLPUBFUN int XMLCALL |
xmlXPathCompiledEvalToBoolean(xmlXPathCompExprPtr comp, |
xmlXPathCompiledEvalToBoolean(xmlXPathCompExprPtr comp, |
xmlXPathContextPtr ctxt); |
xmlXPathContextPtr ctxt); |
XMLPUBFUN void XMLCALL | XMLPUBFUN void XMLCALL |
xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp); |
xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp); |
#endif /* LIBXML_XPATH_ENABLED */ |
#endif /* LIBXML_XPATH_ENABLED */ |
#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) |
#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) |
XMLPUBFUN void XMLCALL | XMLPUBFUN void XMLCALL |
xmlXPathInit (void); |
xmlXPathInit (void); |
XMLPUBFUN int XMLCALL |
XMLPUBFUN int XMLCALL |
xmlXPathIsNaN (double val); |
xmlXPathIsNaN (double val); |