Lines Matching refs:cur
162 * @cur: the node
170 xmlXIncludeGetProp(xmlXIncludeCtxtPtr ctxt, xmlNodePtr cur,
174 ret = xmlGetNsProp(cur, XINCLUDE_NS, name);
178 ret = xmlGetNsProp(cur, XINCLUDE_OLD_NS, name);
182 ret = xmlGetProp(cur, name);
482 * @cur: the new node
487 xmlXIncludeAddNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr cur) {
502 if (cur == NULL)
511 href = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_HREF);
519 parse = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_PARSE);
526 xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_PARSE_VALUE,
539 base = xmlNodeGetBase(ctxt->doc, cur);
566 xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_HREF_URI,
570 fragment = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_PARSE_XPOINTER);
577 xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_HREF_URI,
593 xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_FRAGMENT_ID,
608 xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_HREF_URI,
620 xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_RECURSION,
634 xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_RECURSION,
641 cur);
838 xmlNodePtr cur, res, result = NULL, last = NULL;
843 cur = elem;
844 while (cur != NULL) {
845 res = xmlXIncludeCopyNode(ctxt, target, source, cur);
855 cur = cur->next;
862 * @cur: the node
865 * Returns the @n'th element child of @cur or NULL
868 xmlXIncludeGetNthChild(xmlNodePtr cur, int no) {
870 if (cur == NULL)
871 return(cur);
872 cur = cur->children;
873 for (i = 0;i <= no;cur = cur->next) {
874 if (cur == NULL)
875 return(cur);
876 if ((cur->type == XML_ELEMENT_NODE) ||
877 (cur->type == XML_DOCUMENT_NODE) ||
878 (cur->type == XML_HTML_DOCUMENT_NODE)) {
884 return(cur);
887 xmlNodePtr xmlXPtrAdvanceNode(xmlNodePtr cur, int *level); /* in xpointer.c */
907 xmlNodePtr start, cur, end;
924 cur = start;
935 while (cur != NULL) {
958 if (cur == end) { /* Are we at the end of the range? */
959 if (cur->type == XML_TEXT_NODE) {
960 const xmlChar *content = cur->content;
967 if ((cur == start) && (index1 > 1)) {
989 tmp = xmlDocCopyNode(cur, target, 2);
992 listParent = cur->parent;
1004 end = xmlXIncludeGetNthChild(cur, index2 - 1);
1007 if ((cur == start) && (index1 > 1)) {
1008 cur = xmlXIncludeGetNthChild(cur, index1 - 1);
1011 cur = cur->children;
1015 * Now gather the remaining nodes from cur to end
1019 } else if (cur == start) { /* Not at the end, are we at start? */
1020 if ((cur->type == XML_TEXT_NODE) ||
1021 (cur->type == XML_CDATA_SECTION_NODE)) {
1022 const xmlChar *content = cur->content;
1034 listParent = cur->parent;
1040 tmp = xmlDocCopyNode(cur, target, 2);
1042 listParent = cur->parent;
1044 cur = xmlXIncludeGetNthChild(cur, index1 - 1);
1048 * Now gather the remaining nodes from cur to end
1055 switch (cur->type) {
1077 tmp = xmlDocCopyNode(cur, target, 2);
1093 cur = xmlXPtrAdvanceNode(cur, &level);
1148 xmlNodePtr tmp, cur = set->nodeTab[i];
1150 cur = cur->next;
1151 while (cur != NULL) {
1152 switch(cur->type) {
1161 source, cur);
1168 cur = cur->next;
1333 xmlNodePtr cur;
1344 cur = xmlDocGetRootElement(doc);
1345 if (cur == NULL)
1347 target = xmlCreateIntSubset(doc, cur->name, NULL, NULL);
1884 int cur;
1887 cur = xmlStringCurrentChar(NULL, &content[i], &l);
1888 if (!IS_CHAR(cur)) {
1992 xmlNodePtr cur;
2005 cur = ctxt->incTab[nr]->ref;
2006 if (cur == NULL)
2012 href = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_HREF);
2018 parse = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_PARSE);
2039 base = xmlNodeGetBase(ctxt->doc, cur);
2084 /* xmlXIncludeGetFragment(ctxt, cur, URI); */
2103 children = cur->children;
2149 xmlNodePtr cur, end, list, tmp;
2155 cur = ctxt->incTab[nr]->ref;
2156 if (cur == NULL)
2176 if ((cur->parent != NULL) &&
2177 (cur->parent->type != XML_ELEMENT_NODE)) {
2203 xmlAddPrevSibling(cur, end);
2205 xmlUnlinkNode(cur);
2206 xmlFreeNode(cur);
2212 cur->type = XML_XINCLUDE_START;
2213 end = xmlNewDocNode(cur->doc, cur->ns, cur->name, NULL);
2221 xmlAddNextSibling(cur, end);
2227 cur = list;
2230 xmlAddPrevSibling(end, cur);
2327 xmlNodePtr cur;
2346 cur = tree;
2347 if (xmlXIncludeTestNode(ctxt, cur) == 1)
2348 xmlXIncludePreProcessNode(ctxt, cur);
2349 while ((cur != NULL) && (cur != tree->parent)) {
2351 if ((cur->children != NULL) &&
2352 (cur->children->type != XML_ENTITY_DECL) &&
2353 (cur->children->type != XML_XINCLUDE_START) &&
2354 (cur->children->type != XML_XINCLUDE_END)) {
2355 cur = cur->children;
2356 if (xmlXIncludeTestNode(ctxt, cur))
2357 xmlXIncludePreProcessNode(ctxt, cur);
2358 } else if (cur->next != NULL) {
2359 cur = cur->next;
2360 if (xmlXIncludeTestNode(ctxt, cur))
2361 xmlXIncludePreProcessNode(ctxt, cur);
2363 if (cur == tree)
2366 cur = cur->parent;
2367 if ((cur == NULL) || (cur == tree->parent))
2369 if (cur->next != NULL) {
2370 cur = cur->next;
2371 if (xmlXIncludeTestNode(ctxt, cur))
2372 xmlXIncludePreProcessNode(ctxt, cur);
2375 } while (cur != NULL);