Lines Matching defs:node
107 ctxt->context->lastError.node = ctxt->context->debugNode;
130 * @cur: the node
152 * @cur: the node
154 * Returns the index of the node in its parent children list, -1
174 * @cur: the node
207 * @node1: the first node
209 * @node2: the second node
236 * @node: the xmlNodePtr
237 * @indx: the indx within the node
244 xmlXPtrNewPoint(xmlNodePtr node, int indx) {
247 if (node == NULL)
259 ret->user = (void *) node;
324 * @start: the starting node
402 * @end: the ending node
404 * Create a new xmlXPathObjectPtr of type range from a point to a node
436 * @start: the starting node
439 * Create a new xmlXPathObjectPtr of type range from a node to a point
473 * @start: the starting node
474 * @end: the ending node
506 * @start: the starting and ending node
535 * @start: the starting node
812 * @set: a node set
917 * Move the current node of the nodeset on the stack to the
1037 ctxt->context->node = (xmlNodePtr)ctxt->context->doc;
1316 * @here: the node that directly contains the XPointer being evaluated or NULL
1385 "xmlXPtrEval: evaluation failed to return a node set\n",
1428 * Build a node list tree copy of the range
1431 * the caller has to free the node tree.
1477 /* single sub text node selection */
1585 * Skip to next node in document order
1600 * Build a node list tree copy of the XPointer result.
1604 * the caller has to free the node tree.
1693 * @node: an xmlNodePtr
1695 * Count the number of location children of @node or the length of the
1701 xmlXPtrNbLocChildren(xmlNodePtr node) {
1703 if (node == NULL)
1705 switch (node->type) {
1709 node = node->children;
1710 while (node != NULL) {
1711 if (node->type == XML_ELEMENT_NODE)
1713 node = node->next;
1724 ret = xmlStrlen(node->content);
1785 * - the container node of the start point is x and the index is 0.
1832 xmlNodePtr node = tmp->user;
1833 if (node != NULL) {
1834 if (node->type == XML_ATTRIBUTE_NODE) {
1840 point = xmlXPtrNewPoint(node, tmp->index);
1876 * - If x is of type root or element, the container node of the resulting
1879 * node of the resulting point is x and the index is the length of the
1922 xmlNodePtr node = tmp->user2;
1923 if (node != NULL) {
1924 if (node->type == XML_ATTRIBUTE_NODE) {
1930 point = xmlXPtrNewPoint(node, tmp->index2);
1932 point = xmlXPtrNewPoint(node,
1933 xmlXPtrNbLocChildren(node));
1981 xmlNodePtr node = (xmlNodePtr) loc->user;
1982 if (node == (xmlNodePtr) ctxt->context->doc) {
1983 return(xmlXPtrNewRange(node, 0, node,
1984 xmlXPtrGetArity(node)));
1986 switch (node->type) {
1989 return(xmlXPtrNewRange(node, 0, node,
1990 xmlXPtrGetArity(node)));
2000 int indx = xmlXPtrGetIndex(node);
2002 node = node->parent;
2003 return(xmlXPtrNewRange(node, indx - 1,
2004 node, indx + 1));
2090 xmlNodePtr node = (xmlNodePtr) loc->user;
2091 switch (node->type) {
2096 if (node->content == NULL) {
2097 return(xmlXPtrNewRange(node, 0, node, 0));
2099 return(xmlXPtrNewRange(node, 0, node,
2100 xmlStrlen(node->content)));
2109 return(xmlXPtrNewRange(node, 0, node,
2110 xmlXPtrGetArity(node)));
2118 xmlNodePtr node = (xmlNodePtr) loc->user;
2120 return(xmlXPtrNewRange(node, loc->index,
2123 switch (node->type) {
2128 if (node->content == NULL) {
2129 return(xmlXPtrNewRange(node, 0, node, 0));
2131 return(xmlXPtrNewRange(node, 0, node,
2132 xmlStrlen(node->content)));
2141 return(xmlXPtrNewRange(node, 0, node,
2142 xmlXPtrGetArity(node)));
2244 ctxt->context->node = NULL;
2253 * Run the evaluation with a node list made of a single item
2256 ctxt->context->node = oldset->nodeTab[i];
2257 tmp = xmlXPathNewNodeSet(ctxt->context->node);
2283 ctxt->context->node = NULL;
2290 ctxt->context->node = NULL;
2298 * @cur: the node
2301 * Advance to the next element or text node in document order
2350 * @node: the node
2359 xmlXPtrAdvanceChar(xmlNodePtr *node, int *indx, int bytes) {
2364 if ((node == NULL) || (indx == NULL))
2366 cur = *node;
2373 * First position to the beginning of the first text node
2390 *node = NULL;
2400 *node = cur;
2405 * We should have a text (or cdata) node ...
2413 /* Strange, the indx in the text node is greater than it's len */
2423 *node = cur;
2611 * @node: the node
2619 xmlXPtrGetLastChar(xmlNodePtr *node, int *indx) {
2623 if ((node == NULL) || (*node == NULL) ||
2624 ((*node)->type == XML_NAMESPACE_DECL) || (indx == NULL))
2626 cur = *node;
2649 *node = cur;
2657 * @node: the resulting node
2665 xmlXPtrGetStartPoint(xmlXPathObjectPtr obj, xmlNodePtr *node, int *indx) {
2666 if ((obj == NULL) || (node == NULL) || (indx == NULL))
2671 *node = obj->user;
2678 *node = obj->user;
2693 * @node: the resulting node
2701 xmlXPtrGetEndPoint(xmlXPathObjectPtr obj, xmlNodePtr *node, int *indx) {
2702 if ((obj == NULL) || (node == NULL) || (indx == NULL))
2707 *node = obj->user;
2714 *node = obj->user;
2899 * a Location Set instead of a node set
2927 ctxt->context->node = NULL;
2950 * Run the evaluation with a node list made of a single item
2953 ctxt->context->node = oldset->locTab[i]->user;
2954 tmp = xmlXPathNewNodeSet(ctxt->context->node);
2982 ctxt->context->node = NULL;
2989 ctxt->context->node = NULL;