Home | History | Annotate | Download | only in libxml2

Lines Matching refs:cur

484 xmlValidPrintNode(xmlNodePtr cur) {
485 if (cur == NULL) {
489 switch (cur->type) {
491 xmlGenericError(xmlGenericErrorContext, "%s ", cur->name);
500 xmlGenericError(xmlGenericErrorContext, "&%s; ", cur->name);
503 xmlGenericError(xmlGenericErrorContext, "pi(%s) ", cur->name);
559 xmlValidPrintNodeList(xmlNodePtr cur) {
560 if (cur == NULL)
562 while (cur != NULL) {
563 xmlValidPrintNode(cur);
564 cur = cur->next;
569 xmlValidDebug(xmlNodePtr cur, xmlElementContentPtr cont) {
574 xmlValidPrintNodeList(cur);
897 * @cur: the validation context to free
902 xmlFreeValidCtxt(xmlValidCtxtPtr cur) {
903 if (cur->vstateTab != NULL)
904 xmlFree(cur->vstateTab);
905 if (cur->nodeTab != NULL)
906 xmlFree(cur->nodeTab);
907 xmlFree(cur);
1003 * @cur: An element content pointer.
1010 xmlCopyDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) {
1014 if (cur == NULL) return(NULL);
1025 ret->type = cur->type;
1026 ret->ocur = cur->ocur;
1027 if (cur->name != NULL) {
1029 ret->name = xmlDictLookup(dict, cur->name, -1);
1031 ret->name = xmlStrdup(cur->name);
1034 if (cur->prefix != NULL) {
1036 ret->prefix = xmlDictLookup(dict, cur->prefix, -1);
1038 ret->prefix = xmlStrdup(cur->prefix);
1040 if (cur->c1 != NULL)
1041 ret->c1 = xmlCopyDocElementContent(doc, cur->c1);
1044 if (cur->c2 != NULL) {
1046 cur = cur->c2;
1047 while (cur != NULL) {
1054 tmp->type = cur->type;
1055 tmp->ocur = cur->ocur;
1057 if (cur->name != NULL) {
1059 tmp->name = xmlDictLookup(dict, cur->name, -1);
1061 tmp->name = xmlStrdup(cur->name);
1064 if (cur->prefix != NULL) {
1066 tmp->prefix = xmlDictLookup(dict, cur->prefix, -1);
1068 tmp->prefix = xmlStrdup(cur->prefix);
1070 if (cur->c1 != NULL)
1071 tmp->c1 = xmlCopyDocElementContent(doc,cur->c1);
1075 cur = cur->c2;
1083 * @cur: An element content pointer.
1091 xmlCopyElementContent(xmlElementContentPtr cur) {
1092 return(xmlCopyDocElementContent(NULL, cur));
1098 * @cur: the element content tree to free
1103 xmlFreeDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) {
1110 while (cur != NULL) {
1111 next = cur->c2;
1112 switch (cur->type) {
1124 if (cur->c1 != NULL) xmlFreeDocElementContent(doc, cur->c1);
1126 if ((cur->name != NULL) && (!xmlDictOwns(dict, cur->name)))
1127 xmlFree((xmlChar *) cur->name);
1128 if ((cur->prefix != NULL) && (!xmlDictOwns(dict, cur->prefix)))
1129 xmlFree((xmlChar *) cur->prefix);
1131 if (cur->name != NULL) xmlFree((xmlChar *) cur->name);
1132 if (cur->prefix != NULL) xmlFree((xmlChar *) cur->prefix);
1134 xmlFree(cur);
1135 cur = next;
1141 * @cur: the element content tree to free
1147 xmlFreeElementContent(xmlElementContentPtr cur) {
1148 xmlFreeDocElementContent(NULL, cur);
1618 xmlElementPtr cur;
1620 cur = (xmlElementPtr) xmlMalloc(sizeof(xmlElement));
1621 if (cur == NULL) {
1625 memset(cur, 0, sizeof(xmlElement));
1626 cur->type = XML_ELEMENT_DECL;
1627 cur->etype = elem->etype;
1629 cur->name = xmlStrdup(elem->name);
1631 cur->name = NULL;
1633 cur->prefix = xmlStrdup(elem->prefix);
1635 cur->prefix = NULL;
1636 cur->content = xmlCopyElementContent(elem->content);
1638 cur->attributes = NULL;
1639 return(cur);
1773 * @cur: the tree to free.
1778 xmlFreeEnumeration(xmlEnumerationPtr cur) {
1779 if (cur == NULL) return;
1781 if (cur->next != NULL) xmlFreeEnumeration(cur->next);
1783 if (cur->name != NULL) xmlFree((xmlChar *) cur->name);
1784 xmlFree(cur);
1790 * @cur: the tree to copy.
1798 xmlCopyEnumeration(xmlEnumerationPtr cur) {
1801 if (cur == NULL) return(NULL);
1802 ret = xmlCreateEnumeration((xmlChar *) cur->name);
1804 if (cur->next != NULL) ret->next = xmlCopyEnumeration(cur->next);
1820 xmlDumpEnumeration(xmlBufferPtr buf, xmlEnumerationPtr cur) {
1821 if ((buf == NULL) || (cur == NULL))
1824 xmlBufferWriteCHAR(buf, cur->name);
1825 if (cur->next == NULL)
1829 xmlDumpEnumeration(buf, cur->next);
1895 xmlAttributePtr cur;
1899 cur = elem->attributes;
1900 while (cur != NULL) {
1901 if (cur->atype == XML_ATTRIBUTE_ID) {
1906 elem->name, cur->name, NULL);
1908 cur = cur->nexth;
2210 xmlAttributePtr cur;
2212 cur = (xmlAttributePtr) xmlMalloc(sizeof(xmlAttribute));
2213 if (cur == NULL) {
2217 memset(cur, 0, sizeof(xmlAttribute));
2218 cur->type = XML_ATTRIBUTE_DECL;
2219 cur->atype = attr->atype;
2220 cur->def = attr->def;
2221 cur->tree = xmlCopyEnumeration(attr->tree);
2223 cur->elem = xmlStrdup(attr->elem);
2225 cur->name = xmlStrdup(attr->name);
2227 cur->prefix = xmlStrdup(attr->prefix);
2229 cur->defaultValue = xmlStrdup(attr->defaultValue);
2230 return(cur);
2482 xmlNotationPtr cur;
2484 cur = (xmlNotationPtr) xmlMalloc(sizeof(xmlNotation));
2485 if (cur == NULL) {
2490 cur->name = xmlStrdup(nota->name);
2492 cur->name = NULL;
2494 cur->PublicID = xmlStrdup(nota->PublicID);
2496 cur->PublicID = NULL;
2498 cur->SystemID = xmlStrdup(nota->SystemID);
2500 cur->SystemID = NULL;
2501 return(cur);
3196 xmlElementPtr cur;
3207 cur = xmlHashLookup2(table, name, prefix);
3210 return(cur);
3226 xmlElementPtr cur;
3256 cur = xmlHashLookup2(table, name, prefix);
3257 if ((cur == NULL) && (create)) {
3258 cur = (xmlElementPtr) xmlMalloc(sizeof(xmlElement));
3259 if (cur == NULL) {
3263 memset(cur, 0, sizeof(xmlElement));
3264 cur->type = XML_ELEMENT_DECL;
3269 cur->name = xmlStrdup(name);
3270 cur->prefix = xmlStrdup(prefix);
3271 cur->etype = XML_ELEMENT_TYPE_UNDEFINED;
3273 xmlHashAddEntry2(table, name, prefix, cur);
3277 return(cur);
3318 xmlAttributePtr cur;
3331 cur = xmlHashLookup3(table, uqname, prefix, elem);
3335 cur = xmlHashLookup3(table, name, NULL, elem);
3336 return(cur);
3538 const xmlChar *cur;
3542 cur = value;
3543 val = xmlStringCurrentChar(NULL, cur, &len);
3544 cur += len;
3548 val = xmlStringCurrentChar(NULL, cur, &len);
3549 cur += len;
3551 val = xmlStringCurrentChar(NULL, cur, &len);
3552 cur += len;
3586 const xmlChar *cur;
3590 cur = value;
3591 val = xmlStringCurrentChar(NULL, cur, &len);
3592 cur += len;
3597 val = xmlStringCurrentChar(NULL, cur, &len);
3598 cur += len;
3600 val = xmlStringCurrentChar(NULL, cur, &len);
3601 cur += len;
3607 val = xmlStringCurrentChar(NULL, cur, &len);
3608 cur += len;
3614 val = xmlStringCurrentChar(NULL, cur, &len);
3615 cur += len;
3618 val = xmlStringCurrentChar(NULL, cur, &len);
3619 cur += len;
3656 const xmlChar *cur;
3660 cur = value;
3661 val = xmlStringCurrentChar(NULL, cur, &len);
3662 cur += len;
3667 val = xmlStringCurrentChar(NULL, cur, &len);
3668 cur += len;
3670 val = xmlStringCurrentChar(NULL, cur, &len);
3671 cur += len;
3709 const xmlChar *cur;
3713 cur = value;
3714 val = xmlStringCurrentChar(NULL, cur, &len);
3715 cur += len;
3718 val = xmlStringCurrentChar(NULL, cur, &len);
3719 cur += len;
3726 val = xmlStringCurrentChar(NULL, cur, &len);
3727 cur += len;
3733 val = xmlStringCurrentChar(NULL, cur, &len);
3734 cur += len;
3741 val = xmlStringCurrentChar(NULL, cur, &len);
3742 cur += len;
3745 val = xmlStringCurrentChar(NULL, cur, &len);
3746 cur += len;
3924 xmlChar *dup, *nam = NULL, *cur, save;
3930 cur = dup;
3931 while (*cur != 0) {
3932 nam = cur;
3933 while ((*cur != 0) && (!IS_BLANK_CH(*cur))) cur++;
3934 save = *cur;
3935 *cur = 0;
3952 *cur = save;
3953 while (IS_BLANK_CH(*cur)) cur++;
4295 xmlElementContentPtr cur, next;
4298 cur = elem->content;
4299 while (cur != NULL) {
4300 if (cur->type != XML_ELEMENT_CONTENT_OR) break;
4301 if (cur->c1 == NULL) break;
4302 if (cur->c1->type == XML_ELEMENT_CONTENT_ELEMENT) {
4303 name = cur->c1->name;
4304 next = cur->c2;
4308 (xmlStrEqual(next->prefix, cur->prefix))) {
4309 if (cur->prefix == NULL) {
4316 elem->name, cur->prefix, name);
4325 (xmlStrEqual(next->c1->prefix, cur->prefix))) {
4326 if (cur->prefix == NULL) {
4333 elem->name, cur->prefix, name);
4340 cur = cur->c2;
5026 xmlNodePtr cur;
5029 cur = ctxt->vstate->node;
5035 if (cur != ctxt->vstate->node)
5040 cur = ctxt->vstate->node;
5046 if (cur != ctxt->vstate->node)
5152 xmlNodePtr cur;
5154 cur = ctxt->vstate->node;
5160 if (cur != ctxt->vstate->node)
5165 xmlNodePtr cur;
5167 cur = ctxt->vstate->node;
5173 if (cur != ctxt->vstate->node)
5193 xmlNodePtr cur;
5198 cur = node;
5199 while (cur != NULL) {
5206 switch (cur->type) {
5208 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
5209 if (size - len < xmlStrlen(cur->ns->prefix) + 10) {
5214 strcat(buf, (char *) cur->ns->prefix);
5217 if (size - len < xmlStrlen(cur->name) + 10) {
5222 strcat(buf, (char *) cur->name);
5223 if (cur->next != NULL)
5227 if (xmlIsBlankNode(cur))
5232 if (cur->next != NULL)
5246 if (cur->next != NULL)
5260 cur = cur->next;
5285 xmlNodePtr cur;
5311 cur = child;
5312 while (cur != NULL) {
5313 switch (cur->type) {
5319 if ((cur->children != NULL) &&
5320 (cur->children->children != NULL)) {
5321 nodeVPush(ctxt, cur);
5322 cur = cur->children->children;
5327 if (xmlIsBlankNode(cur))
5336 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
5340 fullname = xmlBuildQName(cur->name,
5341 cur->ns->prefix, fn, 50);
5347 if ((fullname != fn) && (fullname != cur->name))
5350 ret = xmlRegExecPushString(exec, cur->name, NULL);
5359 cur = cur->next;
5360 while (cur == NULL) {
5361 cur = nodeVPop(ctxt);
5362 if (cur == NULL)
5364 cur = cur->next;
5408 cur = child;
5409 while (cur != NULL) {
5410 switch (cur->type) {
5416 if ((cur->children != NULL) &&
5417 (cur->children->children != NULL)) {
5418 nodeVPush(ctxt, cur);
5419 cur = cur->children->children;
5424 if (xmlIsBlankNode(cur))
5441 tmp->type = cur->type;
5442 tmp->name = cur->name;
5443 tmp->ns = cur->ns;
5452 if (cur->type == XML_CDATA_SECTION_NODE) {
5466 cur = cur->next;
5467 while (cur == NULL) {
5468 cur = nodeVPop(ctxt);
5469 if (cur == NULL)
5471 cur = cur->next;
5568 xmlNodePtr cur, child;
5575 cur = child;
5576 while (cur != NULL) {
5577 switch (cur->type) {
5583 if ((cur->children != NULL) &&
5584 (cur->children->children != NULL)) {
5585 nodeVPush(ctxt, cur);
5586 cur = cur->children->children;
5602 cur = cur->next;
5603 while (cur == NULL) {
5604 cur = nodeVPop(ctxt);
5605 if (cur == NULL)
5607 cur = cur->next;
6493 xmlChar *dup, *str = NULL, *cur, save;
6500 cur = dup;
6501 while (*cur != 0) {
6502 str = cur;
6503 while ((*cur != 0) && (!IS_BLANK_CH(*cur))) cur++;
6504 save = *cur;
6505 *cur = 0;
6515 *cur = save;
6516 while (IS_BLANK_CH(*cur)) cur++;
6528 xmlChar *dup, *str = NULL, *cur, save;
6536 cur = dup;
6537 while (*cur != 0) {
6538 str = cur;
6539 while ((*cur != 0) && (!IS_BLANK_CH(*cur))) cur++;
6540 save = *cur;
6541 *cur = 0;
6551 *cur = save;
6552 while (IS_BLANK_CH(*cur)) cur++;
6688 xmlValidateNotationCallback(xmlEntityPtr cur, xmlValidCtxtPtr ctxt,
6690 if (cur == NULL)
6692 if (cur->etype == XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) {
6693 xmlChar *notation = cur->content;
6698 ret = xmlValidateNotationUse(ctxt, cur->doc, notation);
6707 xmlValidateAttributeCallback(xmlAttributePtr cur, xmlValidCtxtPtr ctxt,
6713 if (cur == NULL)
6715 switch (cur->atype) {
6727 if (cur->defaultValue != NULL) {
6729 ret = xmlValidateAttributeValue2(ctxt, ctxt->doc, cur->name,
6730 cur->atype, cur->defaultValue);
6734 if (cur->tree != NULL) {
6735 xmlEnumerationPtr tree = cur->tree;
6738 cur->name, cur->atype, tree->name);
6745 if (cur->atype == XML_ATTRIBUTE_NOTATION) {
6746 doc = cur->doc;
6747 if (cur->elem == NULL) {
6750 (const char *) cur->name);
6755 elem = xmlGetDtdElementDesc(doc->intSubset, cur->elem);
6757 elem = xmlGetDtdElementDesc(doc->extSubset, cur->elem);
6758 if ((elem == NULL) && (cur->parent != NULL) &&
6759 (cur->parent->type == XML_DTD_NODE))
6760 elem = xmlGetDtdElementDesc((xmlDtdPtr) cur->parent, cur->elem);
6764 cur->name, cur->elem, NULL);
6770 cur->name, cur->elem, NULL);