Lines Matching defs:cur

479 xmlValidPrintNode(xmlNodePtr cur) {
480 if (cur == NULL) {
484 switch (cur->type) {
486 xmlGenericError(xmlGenericErrorContext, "%s ", cur->name);
495 xmlGenericError(xmlGenericErrorContext, "&%s; ", cur->name);
498 xmlGenericError(xmlGenericErrorContext, "pi(%s) ", cur->name);
554 xmlValidPrintNodeList(xmlNodePtr cur) {
555 if (cur == NULL)
557 while (cur != NULL) {
558 xmlValidPrintNode(cur);
559 cur = cur->next;
564 xmlValidDebug(xmlNodePtr cur, xmlElementContentPtr cont) {
569 xmlValidPrintNodeList(cur);
892 * @cur: the validation context to free
897 xmlFreeValidCtxt(xmlValidCtxtPtr cur) {
898 if (cur->vstateTab != NULL)
899 xmlFree(cur->vstateTab);
900 if (cur->nodeTab != NULL)
901 xmlFree(cur->nodeTab);
902 xmlFree(cur);
998 * @cur: An element content pointer.
1005 xmlCopyDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) {
1009 if (cur == NULL) return(NULL);
1020 ret->type = cur->type;
1021 ret->ocur = cur->ocur;
1022 if (cur->name != NULL) {
1024 ret->name = xmlDictLookup(dict, cur->name, -1);
1026 ret->name = xmlStrdup(cur->name);
1029 if (cur->prefix != NULL) {
1031 ret->prefix = xmlDictLookup(dict, cur->prefix, -1);
1033 ret->prefix = xmlStrdup(cur->prefix);
1035 if (cur->c1 != NULL)
1036 ret->c1 = xmlCopyDocElementContent(doc, cur->c1);
1039 if (cur->c2 != NULL) {
1041 cur = cur->c2;
1042 while (cur != NULL) {
1049 tmp->type = cur->type;
1050 tmp->ocur = cur->ocur;
1052 if (cur->name != NULL) {
1054 tmp->name = xmlDictLookup(dict, cur->name, -1);
1056 tmp->name = xmlStrdup(cur->name);
1059 if (cur->prefix != NULL) {
1061 tmp->prefix = xmlDictLookup(dict, cur->prefix, -1);
1063 tmp->prefix = xmlStrdup(cur->prefix);
1065 if (cur->c1 != NULL)
1066 tmp->c1 = xmlCopyDocElementContent(doc,cur->c1);
1070 cur = cur->c2;
1078 * @cur: An element content pointer.
1086 xmlCopyElementContent(xmlElementContentPtr cur) {
1087 return(xmlCopyDocElementContent(NULL, cur));
1093 * @cur: the element content tree to free
1098 xmlFreeDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) {
1105 while (cur != NULL) {
1106 next = cur->c2;
1107 switch (cur->type) {
1119 if (cur->c1 != NULL) xmlFreeDocElementContent(doc, cur->c1);
1121 if ((cur->name != NULL) && (!xmlDictOwns(dict, cur->name)))
1122 xmlFree((xmlChar *) cur->name);
1123 if ((cur->prefix != NULL) && (!xmlDictOwns(dict, cur->prefix)))
1124 xmlFree((xmlChar *) cur->prefix);
1126 if (cur->name != NULL) xmlFree((xmlChar *) cur->name);
1127 if (cur->prefix != NULL) xmlFree((xmlChar *) cur->prefix);
1129 xmlFree(cur);
1130 cur = next;
1136 * @cur: the element content tree to free
1142 xmlFreeElementContent(xmlElementContentPtr cur) {
1143 xmlFreeDocElementContent(NULL, cur);
1613 xmlElementPtr cur;
1615 cur = (xmlElementPtr) xmlMalloc(sizeof(xmlElement));
1616 if (cur == NULL) {
1620 memset(cur, 0, sizeof(xmlElement));
1621 cur->type = XML_ELEMENT_DECL;
1622 cur->etype = elem->etype;
1624 cur->name = xmlStrdup(elem->name);
1626 cur->name = NULL;
1628 cur->prefix = xmlStrdup(elem->prefix);
1630 cur->prefix = NULL;
1631 cur->content = xmlCopyElementContent(elem->content);
1633 cur->attributes = NULL;
1634 return(cur);
1768 * @cur: the tree to free.
1773 xmlFreeEnumeration(xmlEnumerationPtr cur) {
1774 if (cur == NULL) return;
1776 if (cur->next != NULL) xmlFreeEnumeration(cur->next);
1778 if (cur->name != NULL) xmlFree((xmlChar *) cur->name);
1779 xmlFree(cur);
1785 * @cur: the tree to copy.
1793 xmlCopyEnumeration(xmlEnumerationPtr cur) {
1796 if (cur == NULL) return(NULL);
1797 ret = xmlCreateEnumeration((xmlChar *) cur->name);
1799 if (cur->next != NULL) ret->next = xmlCopyEnumeration(cur->next);
1815 xmlDumpEnumeration(xmlBufferPtr buf, xmlEnumerationPtr cur) {
1816 if ((buf == NULL) || (cur == NULL))
1819 xmlBufferWriteCHAR(buf, cur->name);
1820 if (cur->next == NULL)
1824 xmlDumpEnumeration(buf, cur->next);
1890 xmlAttributePtr cur;
1894 cur = elem->attributes;
1895 while (cur != NULL) {
1896 if (cur->atype == XML_ATTRIBUTE_ID) {
1901 elem->name, cur->name, NULL);
1903 cur = cur->nexth;
2201 xmlAttributePtr cur;
2203 cur = (xmlAttributePtr) xmlMalloc(sizeof(xmlAttribute));
2204 if (cur == NULL) {
2208 memset(cur, 0, sizeof(xmlAttribute));
2209 cur->type = XML_ATTRIBUTE_DECL;
2210 cur->atype = attr->atype;
2211 cur->def = attr->def;
2212 cur->tree = xmlCopyEnumeration(attr->tree);
2214 cur->elem = xmlStrdup(attr->elem);
2216 cur->name = xmlStrdup(attr->name);
2218 cur->prefix = xmlStrdup(attr->prefix);
2220 cur->defaultValue = xmlStrdup(attr->defaultValue);
2221 return(cur);
2473 xmlNotationPtr cur;
2475 cur = (xmlNotationPtr) xmlMalloc(sizeof(xmlNotation));
2476 if (cur == NULL) {
2481 cur->name = xmlStrdup(nota->name);
2483 cur->name = NULL;
2485 cur->PublicID = xmlStrdup(nota->PublicID);
2487 cur->PublicID = NULL;
2489 cur->SystemID = xmlStrdup(nota->SystemID);
2491 cur->SystemID = NULL;
2492 return(cur);
3187 xmlElementPtr cur;
3198 cur = xmlHashLookup2(table, name, prefix);
3201 return(cur);
3217 xmlElementPtr cur;
3247 cur = xmlHashLookup2(table, name, prefix);
3248 if ((cur == NULL) && (create)) {
3249 cur = (xmlElementPtr) xmlMalloc(sizeof(xmlElement));
3250 if (cur == NULL) {
3254 memset(cur, 0, sizeof(xmlElement));
3255 cur->type = XML_ELEMENT_DECL;
3260 cur->name = xmlStrdup(name);
3261 cur->prefix = xmlStrdup(prefix);
3262 cur->etype = XML_ELEMENT_TYPE_UNDEFINED;
3264 xmlHashAddEntry2(table, name, prefix, cur);
3268 return(cur);
3309 xmlAttributePtr cur;
3322 cur = xmlHashLookup3(table, uqname, prefix, elem);
3326 cur = xmlHashLookup3(table, name, NULL, elem);
3327 return(cur);
3459 const xmlChar *cur;
3463 cur = value;
3464 val = xmlStringCurrentChar(NULL, cur, &len);
3465 cur += len;
3471 val = xmlStringCurrentChar(NULL, cur, &len);
3472 cur += len;
3478 val = xmlStringCurrentChar(NULL, cur, &len);
3479 cur += len;
3498 const xmlChar *cur;
3502 cur = value;
3503 val = xmlStringCurrentChar(NULL, cur, &len);
3504 cur += len;
3511 val = xmlStringCurrentChar(NULL, cur, &len);
3512 cur += len;
3518 val = xmlStringCurrentChar(NULL, cur, &len);
3519 cur += len;
3525 val = xmlStringCurrentChar(NULL, cur, &len);
3526 cur += len;
3533 val = xmlStringCurrentChar(NULL, cur, &len);
3534 cur += len;
3541 val = xmlStringCurrentChar(NULL, cur, &len);
3542 cur += len;
3564 const xmlChar *cur;
3568 cur = value;
3569 val = xmlStringCurrentChar(NULL, cur, &len);
3570 cur += len;
3584 val = xmlStringCurrentChar(NULL, cur, &len);
3585 cur += len;
3606 const xmlChar *cur;
3610 cur = value;
3611 val = xmlStringCurrentChar(NULL, cur, &len);
3612 cur += len;
3615 val = xmlStringCurrentChar(NULL, cur, &len);
3616 cur += len;
3631 val = xmlStringCurrentChar(NULL, cur, &len);
3632 cur += len;
3638 val = xmlStringCurrentChar(NULL, cur, &len);
3639 cur += len;
3655 val = xmlStringCurrentChar(NULL, cur, &len);
3656 cur += len;
3802 xmlChar *dup, *nam = NULL, *cur, save;
3808 cur = dup;
3809 while (*cur != 0) {
3810 nam = cur;
3811 while ((*cur != 0) && (!IS_BLANK_CH(*cur))) cur++;
3812 save = *cur;
3813 *cur = 0;
3830 *cur = save;
3831 while (IS_BLANK_CH(*cur)) cur++;
4172 xmlElementContentPtr cur, next;
4175 cur = elem->content;
4176 while (cur != NULL) {
4177 if (cur->type != XML_ELEMENT_CONTENT_OR) break;
4178 if (cur->c1 == NULL) break;
4179 if (cur->c1->type == XML_ELEMENT_CONTENT_ELEMENT) {
4180 name = cur->c1->name;
4181 next = cur->c2;
4185 (xmlStrEqual(next->prefix, cur->prefix))) {
4186 if (cur->prefix == NULL) {
4193 elem->name, cur->prefix, name);
4202 (xmlStrEqual(next->c1->prefix, cur->prefix))) {
4203 if (cur->prefix == NULL) {
4210 elem->name, cur->prefix, name);
4217 cur = cur->c2;
4903 xmlNodePtr cur;
4906 cur = ctxt->vstate->node;
4912 if (cur != ctxt->vstate->node)
4917 cur = ctxt->vstate->node;
4923 if (cur != ctxt->vstate->node)
5029 xmlNodePtr cur;
5031 cur = ctxt->vstate->node;
5037 if (cur != ctxt->vstate->node)
5042 xmlNodePtr cur;
5044 cur = ctxt->vstate->node;
5050 if (cur != ctxt->vstate->node)
5070 xmlNodePtr cur;
5075 cur = node;
5076 while (cur != NULL) {
5083 switch (cur->type) {
5085 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
5086 if (size - len < xmlStrlen(cur->ns->prefix) + 10) {
5091 strcat(buf, (char *) cur->ns->prefix);
5094 if (size - len < xmlStrlen(cur->name) + 10) {
5099 strcat(buf, (char *) cur->name);
5100 if (cur->next != NULL)
5104 if (xmlIsBlankNode(cur))
5109 if (cur->next != NULL)
5123 if (cur->next != NULL)
5137 cur = cur->next;
5162 xmlNodePtr cur;
5188 cur = child;
5189 while (cur != NULL) {
5190 switch (cur->type) {
5196 if ((cur->children != NULL) &&
5197 (cur->children->children != NULL)) {
5198 nodeVPush(ctxt, cur);
5199 cur = cur->children->children;
5204 if (xmlIsBlankNode(cur))
5213 if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
5217 fullname = xmlBuildQName(cur->name,
5218 cur->ns->prefix, fn, 50);
5224 if ((fullname != fn) && (fullname != cur->name))
5227 ret = xmlRegExecPushString(exec, cur->name, NULL);
5236 cur = cur->next;
5237 while (cur == NULL) {
5238 cur = nodeVPop(ctxt);
5239 if (cur == NULL)
5241 cur = cur->next;
5285 cur = child;
5286 while (cur != NULL) {
5287 switch (cur->type) {
5293 if ((cur->children != NULL) &&
5294 (cur->children->children != NULL)) {
5295 nodeVPush(ctxt, cur);
5296 cur = cur->children->children;
5301 if (xmlIsBlankNode(cur))
5318 tmp->type = cur->type;
5319 tmp->name = cur->name;
5320 tmp->ns = cur->ns;
5329 if (cur->type == XML_CDATA_SECTION_NODE) {
5343 cur = cur->next;
5344 while (cur == NULL) {
5345 cur = nodeVPop(ctxt);
5346 if (cur == NULL)
5348 cur = cur->next;
5445 xmlNodePtr cur, child;
5452 cur = child;
5453 while (cur != NULL) {
5454 switch (cur->type) {
5460 if ((cur->children != NULL) &&
5461 (cur->children->children != NULL)) {
5462 nodeVPush(ctxt, cur);
5463 cur = cur->children->children;
5479 cur = cur->next;
5480 while (cur == NULL) {
5481 cur = nodeVPop(ctxt);
5482 if (cur == NULL)
5484 cur = cur->next;
6370 xmlChar *dup, *str = NULL, *cur, save;
6377 cur = dup;
6378 while (*cur != 0) {
6379 str = cur;
6380 while ((*cur != 0) && (!IS_BLANK_CH(*cur))) cur++;
6381 save = *cur;
6382 *cur = 0;
6392 *cur = save;
6393 while (IS_BLANK_CH(*cur)) cur++;
6405 xmlChar *dup, *str = NULL, *cur, save;
6413 cur = dup;
6414 while (*cur != 0) {
6415 str = cur;
6416 while ((*cur != 0) && (!IS_BLANK_CH(*cur))) cur++;
6417 save = *cur;
6418 *cur = 0;
6428 *cur = save;
6429 while (IS_BLANK_CH(*cur)) cur++;
6565 xmlValidateNotationCallback(xmlEntityPtr cur, xmlValidCtxtPtr ctxt,
6567 if (cur == NULL)
6569 if (cur->etype == XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) {
6570 xmlChar *notation = cur->content;
6575 ret = xmlValidateNotationUse(ctxt, cur->doc, notation);
6584 xmlValidateAttributeCallback(xmlAttributePtr cur, xmlValidCtxtPtr ctxt,
6590 if (cur == NULL)
6592 switch (cur->atype) {
6604 if (cur->defaultValue != NULL) {
6606 ret = xmlValidateAttributeValue2(ctxt, ctxt->doc, cur->name,
6607 cur->atype, cur->defaultValue);
6611 if (cur->tree != NULL) {
6612 xmlEnumerationPtr tree = cur->tree;
6615 cur->name, cur->atype, tree->name);
6622 if (cur->atype == XML_ATTRIBUTE_NOTATION) {
6623 doc = cur->doc;
6624 if (cur->elem == NULL) {
6627 (const char *) cur->name);
6632 elem = xmlGetDtdElementDesc(doc->intSubset, cur->elem);
6634 elem = xmlGetDtdElementDesc(doc->extSubset, cur->elem);
6635 if ((elem == NULL) && (cur->parent != NULL) &&
6636 (cur->parent->type == XML_DTD_NODE))
6637 elem = xmlGetDtdElementDesc((xmlDtdPtr) cur->parent, cur->elem);
6641 cur->name, cur->elem, NULL);
6647 cur->name, cur->elem, NULL);