Gnome XML Library Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# xpathInternals

## Name

xpathInternals --

## Synopsis

    #define     CHECK_ERROR
    #define     CHECK_ERROR0
    #define     XP_ERROR                        (X)
    #define     XP_ERROR0                       (X)
    #define     CHECK_TYPE                      (typeval)
    #define     CHECK_ARITY                     (x)
    #define     CAST_TO_STRING
    #define     CAST_TO_NUMBER
    #define     CAST_TO_BOOLEAN
    void        xmlXPatherror                   (xmlXPathParserContextPtr ctxt,
                                                 const char *file,
                                                 int line,
                                                 int no);
    void        xmlXPathDebugDumpObject         (FILE *output,
                                                 xmlXPathObjectPtr cur,
                                                 int depth);
    int         xmlXPathRegisterNs              (xmlXPathContextPtr ctxt,
                                                 const xmlChar *prefix,
                                                 const xmlChar *ns_uri);
    const xmlChar* xmlXPathNsLookup             (xmlXPathContextPtr ctxt,
                                                 const xmlChar *ns_uri);
    void        xmlXPathRegisteredNsCleanup     (xmlXPathContextPtr ctxt);
    int         xmlXPathRegisterFunc            (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name,
                                                 xmlXPathFunction f);
    int         xmlXPathRegisterFuncNS          (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name,
                                                 const xmlChar *ns_uri,
                                                 xmlXPathFunction f);
    int         xmlXPathRegisterVariable        (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name,
                                                 xmlXPathObjectPtr value);
    int         xmlXPathRegisterVariableNS      (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name,
                                                 const xmlChar *ns_uri,
                                                 xmlXPathObjectPtr value);
    xmlXPathFunction xmlXPathFunctionLookup     (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name);
    xmlXPathFunction xmlXPathFunctionLookupNS   (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name,
                                                 const xmlChar *ns_uri);
    void        xmlXPathRegisteredFuncsCleanup  (xmlXPathContextPtr ctxt);
    xmlXPathObjectPtr xmlXPathVariableLookup    (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name);
    xmlXPathObjectPtr xmlXPathVariableLookupNS  (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name,
                                                 const xmlChar *ns_uri);
    void        xmlXPathRegisteredVariablesCleanup
                                                (xmlXPathContextPtr ctxt);
    xmlXPathParserContextPtr xmlXPathNewParserContext
                                                (const xmlChar *str,
                                                 xmlXPathContextPtr ctxt);
    void        xmlXPathFreeParserContext       (xmlXPathParserContextPtr ctxt);
    xmlXPathObjectPtr valuePop                  (xmlXPathParserContextPtr ctxt);
    int         valuePush                       (xmlXPathParserContextPtr ctxt,
                                                 xmlXPathObjectPtr value);
    xmlXPathObjectPtr xmlXPathNewString         (const xmlChar *val);
    xmlXPathObjectPtr xmlXPathNewCString        (const char *val);
    xmlXPathObjectPtr xmlXPathNewFloat          (double val);
    xmlXPathObjectPtr xmlXPathNewBoolean        (int val);
    xmlXPathObjectPtr xmlXPathNewNodeSet        (xmlNodePtr val);
    void        xmlXPathNodeSetAdd              (xmlNodeSetPtr cur,
                                                 xmlNodePtr val);
    void        xmlXPathIdFunction              (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathRoot                    (xmlXPathParserContextPtr ctxt);
    void        xmlXPathEvalExpr                (xmlXPathParserContextPtr ctxt);
    xmlChar*    xmlXPathParseName               (xmlXPathParserContextPtr ctxt);
    xmlChar*    xmlXPathParseNCName             (xmlXPathParserContextPtr ctxt);
    double      xmlXPathStringEvalNumber        (const xmlChar *str);
    int         xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt,
                                                 xmlXPathObjectPtr res);
    void        xmlXPathInit                    (void);
    void        xmlXPathStringFunction          (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathRegisterAllFunctions    (xmlXPathContextPtr ctxt);
    xmlNodeSetPtr xmlXPathNodeSetCreate         (xmlNodePtr val);
    xmlNodeSetPtr xmlXPathNodeSetMerge          (xmlNodeSetPtr val1,
                                                 xmlNodeSetPtr val2);
    void        xmlXPathNodeSetDel              (xmlNodeSetPtr cur,
                                                 xmlNodePtr val);
    void        xmlXPathNodeSetRemove           (xmlNodeSetPtr cur,
                                                 int val);
    void        xmlXPathFreeNodeSet             (xmlNodeSetPtr obj);
    xmlXPathObjectPtr xmlXPathNewNodeSetList    (xmlNodeSetPtr val);
    xmlXPathObjectPtr xmlXPathWrapNodeSet       (xmlNodeSetPtr val);
    void        xmlXPathFreeNodeSetList         (xmlXPathObjectPtr obj);
    void        xmlXPathFreeObject              (xmlXPathObjectPtr obj);
    xmlXPathContextPtr xmlXPathNewContext       (xmlDocPtr doc);
    void        xmlXPathFreeContext             (xmlXPathContextPtr ctxt);
    int         xmlXPathEqualValues             (xmlXPathParserContextPtr ctxt);
    int         xmlXPathCompareValues           (xmlXPathParserContextPtr ctxt,
                                                 int inf,
                                                 int strict);
    void        xmlXPathValueFlipSign           (xmlXPathParserContextPtr ctxt);
    void        xmlXPathAddValues               (xmlXPathParserContextPtr ctxt);
    void        xmlXPathSubValues               (xmlXPathParserContextPtr ctxt);
    void        xmlXPathMultValues              (xmlXPathParserContextPtr ctxt);
    void        xmlXPathDivValues               (xmlXPathParserContextPtr ctxt);
    void        xmlXPathModValues               (xmlXPathParserContextPtr ctxt);
    void        xmlXPathLastFunction            (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathPositionFunction        (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathCountFunction           (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathLocalNameFunction       (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathNamespaceURIFunction    (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathStringLengthFunction    (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathConcatFunction          (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathContainsFunction        (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathStartsWithFunction      (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathSubstringFunction       (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathSubstringBeforeFunction (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathSubstringAfterFunction  (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathNormalizeFunction       (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathTranslateFunction       (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathNotFunction             (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathTrueFunction            (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathFalseFunction           (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathLangFunction            (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathNumberFunction          (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathSumFunction             (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathFloorFunction           (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathCeilingFunction         (xmlXPathParserContextPtr ctxt,
                                                 int nargs);
    void        xmlXPathRoundFunction           (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

## Description

## Details

### CHECK_ERROR

    #define     CHECK_ERROR

### CHECK_ERROR0

    #define     CHECK_ERROR0

### XP_ERROR()

    #define     XP_ERROR(X)

`X` : |

### XP_ERROR0()

    #define     XP_ERROR0(X)

`X` : |

### CHECK_TYPE()

    #define     CHECK_TYPE(typeval)

`typeval` : |

### CHECK_ARITY()

    #define     CHECK_ARITY(x)

`x` : |

### CAST_TO_STRING

    #define     CAST_TO_STRING

### CAST_TO_NUMBER

    #define     CAST_TO_NUMBER

### CAST_TO_BOOLEAN

    #define     CAST_TO_BOOLEAN

### xmlXPatherror ()

    void        xmlXPatherror                   (xmlXPathParserContextPtr ctxt,
                                                 const char *file,
                                                 int line,
                                                 int no);

`ctxt` : |
`file` : |
`line` : |
`no` : |

### xmlXPathDebugDumpObject ()

    void        xmlXPathDebugDumpObject         (FILE *output,
                                                 xmlXPathObjectPtr cur,
                                                 int depth);

`output` : |
`cur` : |
`depth` : |

### xmlXPathRegisterNs ()

    int         xmlXPathRegisterNs              (xmlXPathContextPtr ctxt,
                                                 const xmlChar *prefix,
                                                 const xmlChar *ns_uri);

Register a new namespace. If `ns_uri` is NULL it unregisters the namespace

`ctxt` : | the XPath context
`prefix` : | the namespace prefix
`ns_uri` : | the namespace name
Returns : | 0 in case of success, -1 in case of error

### xmlXPathNsLookup ()

    const xmlChar* xmlXPathNsLookup             (xmlXPathContextPtr ctxt,
                                                 const xmlChar *ns_uri);

Search in the namespace declaration array of the context for the given namespace name associated to the given prefix

`ctxt` : | the XPath context
`ns_uri` : |
Returns : | the value or NULL if not found

### xmlXPathRegisteredNsCleanup ()

    void        xmlXPathRegisteredNsCleanup     (xmlXPathContextPtr ctxt);

`ctxt` : |

### xmlXPathRegisterFunc ()

    int         xmlXPathRegisterFunc            (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name,
                                                 xmlXPathFunction f);

Register a new function. If `f` is NULL it unregisters the function

`ctxt` : | the XPath context
`name` : | the function name
`f` : | the function implementation or NULL
Returns : | 0 in case of success, -1 in case of error

### xmlXPathRegisterFuncNS ()

    int         xmlXPathRegisterFuncNS          (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name,
                                                 const xmlChar *ns_uri,
                                                 xmlXPathFunction f);

Register a new function. If `f` is NULL it unregisters the function

`ctxt` : | the XPath context
`name` : | the function name
`ns_uri` : | the function namespace URI
`f` : | the function implementation or NULL
Returns : | 0 in case of success, -1 in case of error

### xmlXPathRegisterVariable ()

    int         xmlXPathRegisterVariable        (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name,
                                                 xmlXPathObjectPtr value);

Register a new variable value. If `value` is NULL it unregisters the variable

`ctxt` : | the XPath context
`name` : | the variable name
`value` : | the variable value or NULL
Returns : | 0 in case of success, -1 in case of error

### xmlXPathRegisterVariableNS ()

    int         xmlXPathRegisterVariableNS      (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name,
                                                 const xmlChar *ns_uri,
                                                 xmlXPathObjectPtr value);

Register a new variable value. If `value` is NULL it unregisters the variable

`ctxt` : | the XPath context
`name` : | the variable name
`ns_uri` : | the variable namespace URI
`value` : | the variable value or NULL
Returns : | 0 in case of success, -1 in case of error

### xmlXPathFunctionLookup ()

    xmlXPathFunction xmlXPathFunctionLookup     (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name);

Search in the Function array of the context for the given function.

`ctxt` : | the XPath context
`name` : | the function name
Returns : | the xmlXPathFunction or NULL if not found

### xmlXPathFunctionLookupNS ()

    xmlXPathFunction xmlXPathFunctionLookupNS   (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name,
                                                 const xmlChar *ns_uri);

Search in the Function array of the context for the given function.

`ctxt` : | the XPath context
`name` : | the function name
`ns_uri` : | the function namespace URI
Returns : | the xmlXPathFunction or NULL if not found

### xmlXPathRegisteredFuncsCleanup ()

    void        xmlXPathRegisteredFuncsCleanup  (xmlXPathContextPtr ctxt);

Cleanup the XPath context data associated to registered functions

`ctxt` : | the XPath context

### xmlXPathVariableLookup ()

    xmlXPathObjectPtr xmlXPathVariableLookup    (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name);

Search in the Variable array of the context for the given variable value.

`ctxt` : | the XPath context
`name` : | the variable name
Returns : | the value or NULL if not found

### xmlXPathVariableLookupNS ()

    xmlXPathObjectPtr xmlXPathVariableLookupNS  (xmlXPathContextPtr ctxt,
                                                 const xmlChar *name,
                                                 const xmlChar *ns_uri);

Search in the Variable array of the context for the given variable value.

`ctxt` : | the XPath context
`name` : | the variable name
`ns_uri` : | the variable namespace URI
Returns : | the value or NULL if not found

### xmlXPathRegisteredVariablesCleanup ()

    void        xmlXPathRegisteredVariablesCleanup
                                                (xmlXPathContextPtr ctxt);

Cleanup the XPath context data associated to registered variables

`ctxt` : | the XPath context

### xmlXPathNewParserContext ()

    xmlXPathParserContextPtr xmlXPathNewParserContext
                                                (const xmlChar *str,
                                                 xmlXPathContextPtr ctxt);

Create a new xmlXPathParserContext

`str` : | the XPath expression
`ctxt` : | the XPath context
Returns : | the xmlXPathParserContext just allocated.

### xmlXPathFreeParserContext ()

    void        xmlXPathFreeParserContext       (xmlXPathParserContextPtr ctxt);

Free up an xmlXPathParserContext

`ctxt` : | the context to free

### valuePop ()

    xmlXPathObjectPtr valuePop                  (xmlXPathParserContextPtr ctxt);

`ctxt` : |
Returns : |

### valuePush ()

    int         valuePush                       (xmlXPathParserContextPtr ctxt,
                                                 xmlXPathObjectPtr value);

`ctxt` : |
`value` : |
Returns : |

### xmlXPathNewString ()

    xmlXPathObjectPtr xmlXPathNewString         (const xmlChar *val);

Create a new xmlXPathObjectPtr of type string and of value `val`

`val` : | the xmlChar * value
Returns : | the newly created object.

### xmlXPathNewCString ()

    xmlXPathObjectPtr xmlXPathNewCString        (const char *val);

Create a new xmlXPathObjectPtr of type string and of value `val`

`val` : | the char * value
Returns : | the newly created object.

### xmlXPathNewFloat ()

    xmlXPathObjectPtr xmlXPathNewFloat          (double val);

Create a new xmlXPathObjectPtr of type double and of value `val`

`val` : | the double value
Returns : | the newly created object.

### xmlXPathNewBoolean ()

    xmlXPathObjectPtr xmlXPathNewBoolean        (int val);

Create a new xmlXPathObjectPtr of type boolean and of value `val`

`val` : | the boolean value
Returns : | the newly created object.

### xmlXPathNewNodeSet ()

    xmlXPathObjectPtr xmlXPathNewNodeSet        (xmlNodePtr val);

Create a new xmlXPathObjectPtr of type NodeSet and initialize it with the single Node `val`

`val` : | the NodePtr value
Returns : | the newly created object.

### xmlXPathNodeSetAdd ()

    void        xmlXPathNodeSetAdd              (xmlNodeSetPtr cur,
                                                 xmlNodePtr val);

add a new xmlNodePtr ot an existing NodeSet

`cur` : | the initial node set
`val` : | a new xmlNodePtr

### xmlXPathIdFunction ()

    void        xmlXPathIdFunction              (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the id() XPath function node-set id(object) The id function selects elements by their unique ID (see [5.2.1 Unique IDs]). When the argument to id is of type node-set, then the result is the union of the result of applying id to the string value of each of the nodes in the argument node-set. When the argument to id is of any other type, the argument is converted to a string as if by a call to the string function; the string is split into a whitespace-separated list of tokens (whitespace is any sequence of characters matching the production S); the result is a node-set containing the elements in the same document as the context node that have a unique ID equal to any of the tokens in the list.

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathRoot ()

    void        xmlXPathRoot                    (xmlXPathParserContextPtr ctxt);

Initialize the context to the root of the document

`ctxt` : | the XPath Parser context

### xmlXPathEvalExpr ()

    void        xmlXPathEvalExpr                (xmlXPathParserContextPtr ctxt);

[14] Expr ::= OrExpr [21] OrExpr ::= AndExpr | OrExpr 'or' AndExpr

Parse and evaluate an expression, then push the result on the stack

`ctxt` : | the XPath Parser context

### xmlXPathParseName ()

    xmlChar*    xmlXPathParseName               (xmlXPathParserContextPtr ctxt);

parse an XML name

[4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender

[5] Name ::= (Letter | '_' | ':') (NameChar)*

`ctxt` : | the XPointer Parser context
Returns : | the namespace name or NULL

### xmlXPathParseNCName ()

    xmlChar*    xmlXPathParseNCName             (xmlXPathParserContextPtr ctxt);

parse an XML namespace non qualified name.

[NS 3] NCName ::= (Letter | '_') (NCNameChar)*

[NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender

`ctxt` : | the XPath Parser context
Returns : | the namespace name or NULL

### xmlXPathStringEvalNumber ()

    double      xmlXPathStringEvalNumber        (const xmlChar *str);

[30] Number ::= Digits ('.' Digits?)? | '.' Digits [31] Digits ::= [0-9]+

Parse and evaluate a Number in the string In complement of the Number expression, this function also handles negative values : '-' Number.

`str` : | A string to scan
Returns : | the double value.

### xmlXPathEvaluatePredicateResult ()

    int         xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt,
                                                 xmlXPathObjectPtr res);

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.

`ctxt` : | the XPath Parser context
`res` : | the Predicate Expression evaluation result
Returns : |

### xmlXPathInit ()

    void        xmlXPathInit                    (void);

Initialize the XPath environment

### xmlXPathStringFunction ()

    void        xmlXPathStringFunction          (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the string() XPath function string string(object?) he string function converts an object to a string as follows: - A node-set is converted to a string by returning the value of the node in the node-set that is first in document order. If the node-set is empty, an empty string is returned. - A number is converted to a string as follows + NaN is converted to the string NaN + positive zero is converted to the string 0 + negative zero is converted to the string 0 + positive infinity is converted to the string Infinity + negative infinity is converted to the string -Infinity + if the number is an integer, the number is represented in decimal form as a Number with no decimal point and no leading zeros, preceded by a minus sign (-) if the number is negative + otherwise, the number is represented in decimal form as a Number including a decimal point with at least one digit before the decimal point and at least one digit after the decimal point, preceded by a minus sign (-) if the number is negative; there must be no leading zeros before the decimal point apart possibly from the one required digit immediatelyi before the decimal point; beyond the one required digit after the decimal point there must be as many, but only as many, more digits as are needed to uniquely distinguish the number from all other IEEE 754 numeric values. - The boolean false value is converted to the string false. The boolean true value is converted to the string true.

If the argument is omitted, it defaults to a node-set with the context node as its only member.

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathRegisterAllFunctions ()

    void        xmlXPathRegisterAllFunctions    (xmlXPathContextPtr ctxt);

`ctxt` : |

### xmlXPathNodeSetCreate ()

    xmlNodeSetPtr xmlXPathNodeSetCreate         (xmlNodePtr val);

Create a new xmlNodeSetPtr of type double and of value `val`

`val` : | an initial xmlNodePtr, or NULL
Returns : | the newly created object.

### xmlXPathNodeSetMerge ()

    xmlNodeSetPtr xmlXPathNodeSetMerge          (xmlNodeSetPtr val1,
                                                 xmlNodeSetPtr val2);

Merges two nodesets, all nodes from `val2` are added to `val1` if `val1` is NULL, a new set is created and copied from `val2`

`val1` : | the first NodeSet or NULL
`val2` : | the second NodeSet
Returns : | val1 once extended or NULL in case of error.

### xmlXPathNodeSetDel ()

    void        xmlXPathNodeSetDel              (xmlNodeSetPtr cur,
                                                 xmlNodePtr val);

Removes an xmlNodePtr from an existing NodeSet

`cur` : | the initial node set
`val` : | an xmlNodePtr

### xmlXPathNodeSetRemove ()

    void        xmlXPathNodeSetRemove           (xmlNodeSetPtr cur,
                                                 int val);

Removes an entry from an existing NodeSet list.

`cur` : | the initial node set
`val` : | the index to remove

### xmlXPathFreeNodeSet ()

    void        xmlXPathFreeNodeSet             (xmlNodeSetPtr obj);

Free the NodeSet compound (not the actual nodes !).

`obj` : | the xmlNodeSetPtr to free

### xmlXPathNewNodeSetList ()

    xmlXPathObjectPtr xmlXPathNewNodeSetList    (xmlNodeSetPtr val);

Create a new xmlXPathObjectPtr of type NodeSet and initialize it with the Nodeset `val`

`val` : | an existing NodeSet
Returns : | the newly created object.

### xmlXPathWrapNodeSet ()

    xmlXPathObjectPtr xmlXPathWrapNodeSet       (xmlNodeSetPtr val);

Wrap the Nodeset `val` in a new xmlXPathObjectPtr

`val` : | the NodePtr value
Returns : | the newly created object.

### xmlXPathFreeNodeSetList ()

    void        xmlXPathFreeNodeSetList         (xmlXPathObjectPtr obj);

Free up the xmlXPathObjectPtr `obj` but don't deallocate the objects in the list contrary to xmlXPathFreeObject().

`obj` : | an existing NodeSetList object

### xmlXPathFreeObject ()

    void        xmlXPathFreeObject              (xmlXPathObjectPtr obj);

Free up an xmlXPathObjectPtr object.

`obj` : | the object to free

### xmlXPathNewContext ()

    xmlXPathContextPtr xmlXPathNewContext       (xmlDocPtr doc);

Create a new xmlXPathContext

`doc` : | the XML document
Returns : | the xmlXPathContext just allocated.

### xmlXPathFreeContext ()

    void        xmlXPathFreeContext             (xmlXPathContextPtr ctxt);

Free up an xmlXPathContext

`ctxt` : | the context to free

### xmlXPathEqualValues ()

    int         xmlXPathEqualValues             (xmlXPathParserContextPtr ctxt);

Implement the equal operation on XPath objects content: `arg1` == `arg2`

`ctxt` : | the XPath Parser context
Returns : | 0 or 1 depending on the results of the test.

### xmlXPathCompareValues ()

    int         xmlXPathCompareValues           (xmlXPathParserContextPtr ctxt,
                                                 int inf,
                                                 int strict);

Implement the compare operation on XPath objects: `arg1` < `arg2` (1, 1, ... `arg1` <= `arg2` (1, 0, ... `arg1` > `arg2` (0, 1, ... `arg1` >= `arg2` (0, 0, ...

When neither object to be compared is a node-set and the operator is <=, <, >=, >, then the objects are compared by converted both objects to numbers and comparing the numbers according to IEEE 754. The < comparison will be true if and only if the first number is less than the second number. The <= comparison will be true if and only if the first number is less than or equal to the second number. The > comparison will be true if and only if the first number is greater than the second number. The >= comparison will be true if and only if the first number is greater than or equal to the second number.

`ctxt` : | the XPath Parser context
`inf` : | less than (1) or greater than (2)
`strict` : | is the comparison strict
Returns : |

### xmlXPathValueFlipSign ()

    void        xmlXPathValueFlipSign           (xmlXPathParserContextPtr ctxt);

Implement the unary - operation on an XPath object The numeric operators convert their operands to numbers as if by calling the number function.

`ctxt` : | the XPath Parser context

### xmlXPathAddValues ()

    void        xmlXPathAddValues               (xmlXPathParserContextPtr ctxt);

Implement the add operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function.

`ctxt` : | the XPath Parser context

### xmlXPathSubValues ()

    void        xmlXPathSubValues               (xmlXPathParserContextPtr ctxt);

Implement the substraction operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function.

`ctxt` : | the XPath Parser context

### xmlXPathMultValues ()

    void        xmlXPathMultValues              (xmlXPathParserContextPtr ctxt);

Implement the multiply operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function.

`ctxt` : | the XPath Parser context

### xmlXPathDivValues ()

    void        xmlXPathDivValues               (xmlXPathParserContextPtr ctxt);

Implement the div operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function.

`ctxt` : | the XPath Parser context

### xmlXPathModValues ()

    void        xmlXPathModValues               (xmlXPathParserContextPtr ctxt);

Implement the div operation on XPath objects: `arg1` / `arg2` The numeric operators convert their operands to numbers as if by calling the number function.

`ctxt` : | the XPath Parser context

### xmlXPathLastFunction ()

    void        xmlXPathLastFunction            (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the last() XPath function number last() The last function returns the number of nodes in the context node list.

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathPositionFunction ()

    void        xmlXPathPositionFunction        (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the position() XPath function number position() The position function returns the position of the context node in the context node list. The first position is 1, and so the last positionr will be equal to last().

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathCountFunction ()

    void        xmlXPathCountFunction           (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the count() XPath function number count(node-set)

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathLocalNameFunction ()

    void        xmlXPathLocalNameFunction       (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the local-name() XPath function string local-name(node-set?) The local-name function returns a string containing the local part of the name of the node in the argument node-set that is first in document order. If the node-set is empty or the first node has no name, an empty string is returned. If the argument is omitted it defaults to the context node.

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathNamespaceURIFunction ()

    void        xmlXPathNamespaceURIFunction    (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the namespace-uri() XPath function string namespace-uri(node-set?) The namespace-uri function returns a string containing the namespace URI of the expanded name of the node in the argument node-set that is first in document order. If the node-set is empty, the first node has no name, or the expanded name has no namespace URI, an empty string is returned. If the argument is omitted it defaults to the context node.

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathStringLengthFunction ()

    void        xmlXPathStringLengthFunction    (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the string-length() XPath function number string-length(string?) The string-length returns the number of characters in the string (see [3.6 Strings]). If the argument is omitted, it defaults to the context node converted to a string, in other words the value of the context node.

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathConcatFunction ()

    void        xmlXPathConcatFunction          (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the concat() XPath function string concat(string, string, string*) The concat function returns the concatenation of its arguments.

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathContainsFunction ()

    void        xmlXPathContainsFunction        (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the contains() XPath function boolean contains(string, string) The contains function returns true if the first argument string contains the second argument string, and otherwise returns false.

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathStartsWithFunction ()

    void        xmlXPathStartsWithFunction      (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the starts-with() XPath function boolean starts-with(string, string) The starts-with function returns true if the first argument string starts with the second argument string, and otherwise returns false.

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathSubstringFunction ()

    void        xmlXPathSubstringFunction       (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the substring() XPath function string substring(string, number, number?) The substring function returns the substring of the first argument starting at the position specified in the second argument with length specified in the third argument. For example, substring("12345",2,3) returns "234". If the third argument is not specified, it returns the substring starting at the position specified in the second argument and continuing to the end of the string. For example, substring("12345",2) returns "2345". More precisely, each character in the string (see [3.6 Strings]) is considered to have a numeric position: the position of the first character is 1, the position of the second character is 2 and so on. The returned substring contains those characters for which the position of the character is greater than or equal to the second argument and, if the third argument is specified, less than the sum of the second and third arguments; the comparisons and addition used for the above follow the standard IEEE 754 rules. Thus: - substring("12345", 1.5, 2.6) returns "234" - substring("12345", 0, 3) returns "12" - substring("12345", 0 div 0, 3) returns "" - substring("12345", 1, 0 div 0) returns "" - substring("12345", -42, 1 div 0) returns "12345" - substring("12345", -1 div 0, 1 div 0) returns ""

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathSubstringBeforeFunction ()

    void        xmlXPathSubstringBeforeFunction (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the substring-before() XPath function string substring-before(string, string) The substring-before function returns the substring of the first argument string that precedes the first occurrence of the second argument string in the first argument string, or the empty string if the first argument string does not contain the second argument string. For example, substring-before("1999/04/01","/") returns 1999.

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathSubstringAfterFunction ()

    void        xmlXPathSubstringAfterFunction  (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the substring-after() XPath function string substring-after(string, string) The substring-after function returns the substring of the first argument string that follows the first occurrence of the second argument string in the first argument string, or the empty stringi if the first argument string does not contain the second argument string. For example, substring-after("1999/04/01","/") returns 04/01, and substring-after("1999/04/01","19") returns 99/04/01.

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathNormalizeFunction ()

    void        xmlXPathNormalizeFunction       (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the normalize-space() XPath function string normalize-space(string?) The normalize-space function returns the argument string with white space normalized by stripping leading and trailing whitespace and replacing sequences of whitespace characters by a single space. Whitespace characters are the same allowed by the S production in XML. If the argument is omitted, it defaults to the context node converted to a string, in other words the value of the context node.

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathTranslateFunction ()

    void        xmlXPathTranslateFunction       (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the translate() XPath function string translate(string, string, string) The translate function returns the first argument string with occurrences of characters in the second argument string replaced by the character at the corresponding position in the third argument string. For example, translate("bar","abc","ABC") returns the string BAr. If there is a character in the second argument string with no character at a corresponding position in the third argument string (because the second argument string is longer than the third argument string), then occurrences of that character in the first argument string are removed. For example, translate("--aaa--","abc-","ABC")

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathNotFunction ()

    void        xmlXPathNotFunction             (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the not() XPath function boolean not(boolean) The not function returns true if its argument is false, and false otherwise.

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathTrueFunction ()

    void        xmlXPathTrueFunction            (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the true() XPath function boolean true()

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathFalseFunction ()

    void        xmlXPathFalseFunction           (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the false() XPath function boolean false()

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathLangFunction ()

    void        xmlXPathLangFunction            (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the lang() XPath function boolean lang(string) The lang function returns true or false depending on whether the language of the context node as specified by xml:lang attributes is the same as or is a sublanguage of the language specified by the argument string. The language of the context node is determined by the value of the xml:lang attribute on the context node, or, if the context node has no xml:lang attribute, by the value of the xml:lang attribute on the nearest ancestor of the context node that has an xml:lang attribute. If there is no such attribute, then lang

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathNumberFunction ()

    void        xmlXPathNumberFunction          (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the number() XPath function number number(object?)

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathSumFunction ()

    void        xmlXPathSumFunction             (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the sum() XPath function number sum(node-set) The sum function returns the sum of the values of the nodes in the argument node-set.

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathFloorFunction ()

    void        xmlXPathFloorFunction           (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the floor() XPath function number floor(number) The floor function returns the largest (closest to positive infinity) number that is not greater than the argument and that is an integer.

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathCeilingFunction ()

    void        xmlXPathCeilingFunction         (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the ceiling() XPath function number ceiling(number) The ceiling function returns the smallest (closest to negative infinity) number that is not less than the argument and that is an integer.

`ctxt` : | the XPath Parser context
`nargs` : |

### xmlXPathRoundFunction ()

    void        xmlXPathRoundFunction           (xmlXPathParserContextPtr ctxt,
                                                 int nargs);

Implement the round() XPath function number round(number) The round function returns the number that is closest to the argument and that is an integer. If there are two such numbers, then the one that is even is returned.

`ctxt` : | the XPath Parser context
`nargs` : |

<<< Previous Page | Home | Up | Next Page >>>
xpath | xpointer