35 xmlGenericError(xmlGenericErrorContext, \ 36 "Unimplemented block at %s:%d\n", \ 39 #ifdef LIBXML_VALID_ENABLED 65 channel = ctxt->
error;
69 if ((ctxt->
finishDtd == XML_CTXT_FINISH_DTD_0) ||
70 (ctxt->
finishDtd == XML_CTXT_FINISH_DTD_1)) {
71 long delta = (
char *) ctxt - (
char *) ctxt->
userData;
72 if ((delta > 0) && (delta < 250))
80 "Memory allocation failed : %s\n",
extra);
85 "Memory allocation failed\n");
105 channel = ctxt->error;
106 data = ctxt->userData;
109 if ((ctxt->finishDtd == XML_CTXT_FINISH_DTD_0) ||
110 (ctxt->finishDtd == XML_CTXT_FINISH_DTD_1)) {
111 long delta = (
char *) ctxt - (
char *) ctxt->userData;
112 if ((delta > 0) && (delta < 250))
117 __xmlRaiseError(
NULL, channel,
data,
122 __xmlRaiseError(
NULL, channel,
data,
128 #if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) 146 xmlStructuredErrorFunc schannel =
NULL;
152 channel = ctxt->error;
153 data = ctxt->userData;
156 if ((ctxt->finishDtd == XML_CTXT_FINISH_DTD_0) ||
157 (ctxt->finishDtd == XML_CTXT_FINISH_DTD_1)) {
158 long delta = (
char *) ctxt - (
char *) ctxt->userData;
159 if ((delta > 0) && (delta < 250))
167 (
const char *) str3, 0, 0,
msg, str1, str2, str3);
171 #ifdef LIBXML_VALID_ENABLED 189 xmlStructuredErrorFunc schannel =
NULL;
195 channel = ctxt->error;
196 data = ctxt->userData;
199 if ((ctxt->finishDtd == XML_CTXT_FINISH_DTD_0) ||
200 (ctxt->finishDtd == XML_CTXT_FINISH_DTD_1)) {
201 long delta = (
char *) ctxt - (
char *) ctxt->userData;
202 if ((delta > 0) && (delta < 250))
230 xmlStructuredErrorFunc schannel =
NULL;
236 channel = ctxt->warning;
237 data = ctxt->userData;
240 if ((ctxt->finishDtd == XML_CTXT_FINISH_DTD_0) ||
241 (ctxt->finishDtd == XML_CTXT_FINISH_DTD_1)) {
242 long delta = (
char *) ctxt - (
char *) ctxt->userData;
243 if ((delta > 0) && (delta < 250))
251 (
const char *) str3, 0, 0,
msg, str1, str2, str3);
256 #ifdef LIBXML_REGEXP_ENABLED 266 typedef struct _xmlValidState {
269 xmlRegExecCtxtPtr exec;
302 xmlValidBuildContentModel(ctxt, elemDecl);
310 "Failed to build content model regexp for %s\n",
348 #define ROLLBACK_OR 0 349 #define ROLLBACK_PARENT 1 351 typedef struct _xmlValidState {
359 #define MAX_RECURSE 25000 360 #define MAX_DEPTH ((sizeof(_xmlValidState.occurs)) * 8) 361 #define CONT ctxt->vstate->cont 362 #define NODE ctxt->vstate->node 363 #define DEPTH ctxt->vstate->depth 364 #define OCCURS ctxt->vstate->occurs 365 #define STATE ctxt->vstate->state 367 #define OCCURRENCE (ctxt->vstate->occurs & (1 << DEPTH)) 368 #define PARENT_OCCURRENCE (ctxt->vstate->occurs & ((1 << DEPTH) - 1)) 370 #define SET_OCCURRENCE ctxt->vstate->occurs |= (1 << DEPTH) 371 #define RESET_OCCURRENCE ctxt->vstate->occurs &= ((1 << DEPTH) - 1) 376 unsigned char state) {
407 if ((
i >= 0) && (ctxt->
vstateTab[
i].cont == cont) &&
423 if (ctxt->
vstateNr <= 1)
return(-1);
482 #ifdef DEBUG_VALID_ALGO 529 #ifdef LIBXML_DOCB_ENABLED 530 case XML_DOCB_DOCUMENT_NODE:
563 xmlValidPrintNode(
cur);
574 xmlValidPrintNodeList(
cur);
586 switch (
state->cont->type) {
601 xmlValidPrintNode(
state->node);
611 xmlValidDebugState(ctxt->
vstate);
623 #define DEBUG_VALID_STATE(n,c) xmlValidStateDebug(ctxt); 624 #define DEBUG_VALID_MSG(m) \ 625 xmlGenericError(xmlGenericErrorContext, "%s\n", m); 628 #define DEBUG_VALID_STATE(n,c) 629 #define DEBUG_VALID_MSG(m) 636 if (doc == NULL) return(0); \ 637 else if ((doc->intSubset == NULL) && \ 638 (doc->extSubset == NULL)) return(0) 640 #ifdef LIBXML_REGEXP_ENABLED 664 "Found NULL content in content model of %s\n",
671 "Found PCDATA in content model of %s\n",
676 xmlAutomataStatePtr oldstate = ctxt->
state;
688 ctxt->
state = xmlAutomataNewTransition(ctxt->
am,
692 ctxt->
state = xmlAutomataNewTransition(ctxt->
am,
694 xmlAutomataNewEpsilon(ctxt->
am, oldstate, ctxt->
state);
697 ctxt->
state = xmlAutomataNewTransition(ctxt->
am,
699 xmlAutomataNewTransition(ctxt->
am, ctxt->
state,
703 ctxt->
state = xmlAutomataNewEpsilon(ctxt->
am,
705 xmlAutomataNewTransition(ctxt->
am,
714 xmlAutomataStatePtr oldstate, oldend;
720 oldstate = ctxt->
state;
723 ctxt->
state = xmlAutomataNewEpsilon(ctxt->
am, oldstate,
NULL);
724 oldstate = ctxt->
state;
727 xmlValidBuildAContentModel(
content->c1, ctxt,
name);
732 oldend = ctxt->
state;
733 ctxt->
state = xmlAutomataNewEpsilon(ctxt->
am, oldend,
NULL);
738 xmlAutomataNewEpsilon(ctxt->
am, oldstate, ctxt->
state);
741 xmlAutomataNewEpsilon(ctxt->
am, oldstate, ctxt->
state);
742 xmlAutomataNewEpsilon(ctxt->
am, oldend, oldstate);
745 xmlAutomataNewEpsilon(ctxt->
am, oldend, oldstate);
751 xmlAutomataStatePtr oldstate, oldend;
757 ctxt->
state = xmlAutomataNewEpsilon(ctxt->
am,
760 oldstate = ctxt->
state;
761 oldend = xmlAutomataNewState(ctxt->
am);
768 ctxt->
state = oldstate;
769 xmlValidBuildAContentModel(
content->c1, ctxt,
name);
770 xmlAutomataNewEpsilon(ctxt->
am, ctxt->
state, oldend);
774 ctxt->
state = oldstate;
776 xmlAutomataNewEpsilon(ctxt->
am, ctxt->
state, oldend);
777 ctxt->
state = xmlAutomataNewEpsilon(ctxt->
am, oldend,
NULL);
782 xmlAutomataNewEpsilon(ctxt->
am, oldstate, ctxt->
state);
785 xmlAutomataNewEpsilon(ctxt->
am, oldstate, ctxt->
state);
786 xmlAutomataNewEpsilon(ctxt->
am, oldend, oldstate);
789 xmlAutomataNewEpsilon(ctxt->
am, oldend, oldstate);
796 "ContentModel broken for element %s\n",
797 (
const char *)
name);
823 if (!xmlRegexpIsDeterminist(
elem->contModel)) {
830 ctxt->
am = xmlNewAutomata();
834 "Cannot create automata for element %s\n",
838 ctxt->
state = xmlAutomataGetInitState(ctxt->
am);
839 xmlValidBuildAContentModel(
elem->content, ctxt,
elem->name);
840 xmlAutomataSetFinalState(ctxt->
am, ctxt->
state);
841 elem->contModel = xmlAutomataCompile(ctxt->
am);
842 if (xmlRegexpIsDeterminist(
elem->contModel) != 1) {
848 "Content model of %s is not determinist: %s\n",
850 #ifdef DEBUG_REGEXP_ALGO 855 xmlFreeAutomata(ctxt->
am);
860 xmlFreeAutomata(ctxt->
am);
933 "xmlNewElementContent : name == NULL !\n",
942 "xmlNewElementContent : name != NULL !\n",
948 "Internal: ELEMENT content corrupted invalid type\n",
1052 tmp->type =
cur->type;
1053 tmp->ocur =
cur->ocur;
1070 if (tmp->c1 !=
NULL)
1071 tmp->c1->parent =
ret;
1118 switch (
cur->type) {
1126 "Internal: ELEMENT content corrupted invalid type\n",
1171 #ifdef LIBXML_OUTPUT_ENABLED 1181 switch (
cur->ocur) {
1215 switch (
cur->type) {
1230 ((
cur->type !=
cur->parent->type) ||
1237 "Internal: ELEMENT cur corrupted invalid type\n",
1251 xmlDumpElementOccur(
buf,
cur);
1317 if (
size -
len < qnameLen + 10) {
1409 #ifdef LIBXML_REGEXP_ENABLED 1411 xmlRegFreeRegexp(
elem->contModel);
1450 "xmlAddElementDecl: content != NULL for EMPTY\n",
1458 "xmlAddElementDecl: content != NULL for ANY\n",
1466 "xmlAddElementDecl: content == NULL for MIXED\n",
1474 "xmlAddElementDecl: content == NULL for ELEMENT\n",
1481 "Internal: ELEMENT decl corrupted invalid type\n",
1501 dict = dtd->
doc->dict;
1507 "xmlAddElementDecl: Table creation failed!\n");
1522 oldAttributes =
ret->attributes;
1536 #ifdef LIBXML_VALID_ENABLED 1541 "Redefinition of element %s\n",
1587 #ifdef LIBXML_VALID_ENABLED 1592 "Redefinition of element %s\n",
1604 ret->attributes = oldAttributes;
1616 if ((ctxt !=
NULL) &&
1617 ((ctxt->
finishDtd == XML_CTXT_FINISH_DTD_0) ||
1618 (ctxt->
finishDtd == XML_CTXT_FINISH_DTD_1))) {
1659 #ifdef LIBXML_TREE_ENABLED 1709 #ifdef LIBXML_OUTPUT_ENABLED 1722 switch (
elem->etype) {
1749 xmlDumpElementContent(
buf,
elem->content);
1760 xmlDumpElementContent(
buf,
elem->content);
1765 "Internal: ELEMENT struct corrupted invalid type\n",
1779 xmlDumpElementDeclScan(
void *
elem,
void *
buf,
1840 #ifdef LIBXML_TREE_ENABLED 1858 if (
cur->next !=
NULL)
ret->next = xmlCopyEnumeration(
cur->next);
1865 #ifdef LIBXML_OUTPUT_ENABLED 1883 xmlDumpEnumeration(
buf,
cur->next);
1888 #ifdef LIBXML_VALID_ENABLED 1912 "Element %s has too many ID attributes defined : %s\n",
1933 dict =
attr->doc->dict;
1946 if ((
attr->defaultValue !=
NULL) &&
2004 dict = dtd->
doc->dict;
2006 #ifdef LIBXML_VALID_ENABLED 2033 "Internal: ATTRIBUTE struct corrupted invalid type\n",
2038 if ((defaultValue !=
NULL) &&
2039 (!xmlValidateAttributeValueInternal(dtd->
doc,
type, defaultValue))) {
2041 "Attribute %s of %s: invalid default value\n",
2043 defaultValue =
NULL;
2053 if ((dtd->
doc !=
NULL) && (dtd->
doc->extSubset == dtd) &&
2054 (dtd->
doc->intSubset !=
NULL) &&
2055 (dtd->
doc->intSubset->attributes !=
NULL)) {
2073 "xmlAddAttributeDecl: Table creation failed!\n");
2109 if (defaultValue !=
NULL) {
2121 #ifdef LIBXML_VALID_ENABLED 2126 "Attribute %s of element %s: already defined\n",
2138 if (elemDef !=
NULL) {
2140 #ifdef LIBXML_VALID_ENABLED 2142 (xmlScanIDAttributeDecl(
NULL, elemDef, 1) != 0)) {
2144 "Element %s has too may ID attributes defined : %s\n",
2163 while ((tmp !=
NULL) &&
2211 #ifdef LIBXML_TREE_ENABLED 2234 cur->tree = xmlCopyEnumeration(
attr->tree);
2260 #ifdef LIBXML_OUTPUT_ENABLED 2281 switch (
attr->atype) {
2308 xmlDumpEnumeration(
buf,
attr->tree);
2312 xmlDumpEnumeration(
buf,
attr->tree);
2316 "Internal: ATTRIBUTE struct corrupted invalid type\n",
2319 switch (
attr->def) {
2333 "Internal: ATTRIBUTE struct corrupted invalid def\n",
2351 xmlDumpAttributeDeclScan(
void *
attr,
void *
buf,
2384 if (nota ==
NULL)
return;
2420 if ((PublicID ==
NULL) && (SystemID ==
NULL)) {
2431 dict = dtd->
doc->dict;
2437 "xmlAddNotationDecl: Table creation failed!\n");
2452 if (SystemID !=
NULL)
2454 if (PublicID !=
NULL)
2462 #ifdef LIBXML_VALID_ENABLED 2464 "xmlAddNotationDecl: %s already defined\n",
2465 (
const char *)
name);
2489 #ifdef LIBXML_TREE_ENABLED 2537 #ifdef LIBXML_OUTPUT_ENABLED 2573 xmlDumpNotationDeclScan(
void *nota,
void *
buf,
2605 #define DICT_FREE(str) \ 2606 if ((str) && ((!dict) || \ 2607 (xmlDictOwns(dict, (const xmlChar *)(str)) == 0))) \ 2608 xmlFree((char *)(str)); 2620 if (
id ==
NULL)
return;
2623 dict =
id->doc->
dict;
2669 "xmlAddID: Table creation failed!\n");
2700 #ifdef LIBXML_VALID_ENABLED 2753 if (doc ==
NULL)
return(0);
2769 xmlChar *fullelemname, *fullattrname;
2779 if (fullelemname !=
NULL && fullattrname !=
NULL) {
2787 if ((fullattrname !=
fattr) && (fullattrname !=
attr->
name))
2789 if ((fullelemname != felem) && (fullelemname !=
elem->name))
2813 if (doc ==
NULL)
return(-1);
2922 if (list_ref ==
NULL)
return;
2940 if (attr0 == attr1) {
2998 "xmlAddRef: Table creation failed!\n");
3034 "xmlAddRef: Reference list creation failed!\n",
3041 "xmlAddRef: Reference list insertion failed!\n",
3048 "xmlAddRef: Reference list insertion failed!\n",
3093 if (doc ==
NULL)
return(0);
3110 if ((attrDecl !=
NULL) &&
3134 if (doc ==
NULL)
return(-1);
3146 if(ref_list ==
NULL) {
3259 dict = dtd->
doc->dict;
3355 if (uqname !=
NULL) {
3410 #if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) 3425 const xmlChar *notationName) {
3428 (notationName ==
NULL))
return(-1);
3434 if ((notaDecl ==
NULL) && (ctxt !=
NULL)) {
3436 "NOTATION %s is not declared\n",
3464 if (elemDecl ==
NULL)
return(-1);
3465 switch (elemDecl->
etype) {
3482 #ifdef LIBXML_VALID_ENABLED 3485 xmlIsDocNameStartChar(
xmlDocPtr doc,
int c) {
3491 if (((
c >=
'a') && (
c <=
'z')) ||
3492 ((
c >=
'A') && (
c <=
'Z')) ||
3493 (
c ==
'_') || (
c ==
':') ||
3494 ((
c >= 0xC0) && (
c <= 0xD6)) ||
3495 ((
c >= 0xD8) && (
c <= 0xF6)) ||
3496 ((
c >= 0xF8) && (
c <= 0x2FF)) ||
3497 ((
c >= 0x370) && (
c <= 0x37D)) ||
3498 ((
c >= 0x37F) && (
c <= 0x1FFF)) ||
3499 ((
c >= 0x200C) && (
c <= 0x200D)) ||
3500 ((
c >= 0x2070) && (
c <= 0x218F)) ||
3501 ((
c >= 0x2C00) && (
c <= 0x2FEF)) ||
3502 ((
c >= 0x3001) && (
c <= 0xD7FF)) ||
3503 ((
c >= 0xF900) && (
c <= 0xFDCF)) ||
3504 ((
c >= 0xFDF0) && (
c <= 0xFFFD)) ||
3505 ((
c >= 0x10000) && (
c <= 0xEFFFF)))
3521 if (((
c >=
'a') && (
c <=
'z')) ||
3522 ((
c >=
'A') && (
c <=
'Z')) ||
3523 ((
c >=
'0') && (
c <=
'9')) ||
3524 (
c ==
'_') || (
c ==
':') ||
3525 (
c ==
'-') || (
c ==
'.') || (
c == 0xB7) ||
3526 ((
c >= 0xC0) && (
c <= 0xD6)) ||
3527 ((
c >= 0xD8) && (
c <= 0xF6)) ||
3528 ((
c >= 0xF8) && (
c <= 0x2FF)) ||
3529 ((
c >= 0x300) && (
c <= 0x36F)) ||
3530 ((
c >= 0x370) && (
c <= 0x37D)) ||
3531 ((
c >= 0x37F) && (
c <= 0x1FFF)) ||
3532 ((
c >= 0x200C) && (
c <= 0x200D)) ||
3533 ((
c >= 0x203F) && (
c <= 0x2040)) ||
3534 ((
c >= 0x2070) && (
c <= 0x218F)) ||
3535 ((
c >= 0x2C00) && (
c <= 0x2FEF)) ||
3536 ((
c >= 0x3001) && (
c <= 0xD7FF)) ||
3537 ((
c >= 0xF900) && (
c <= 0xFDCF)) ||
3538 ((
c >= 0xFDF0) && (
c <= 0xFFFD)) ||
3539 ((
c >= 0x10000) && (
c <= 0xEFFFF)))
3543 (
c ==
'.') || (
c ==
'-') ||
3544 (
c ==
'_') || (
c ==
':') ||
3571 if (!xmlIsDocNameStartChar(doc,
val))
3576 while (xmlIsDocNameChar(doc,
val)) {
3581 if (
val != 0)
return(0);
3597 return(xmlValidateNameValueInternal(
NULL,
value));
3620 if (!xmlIsDocNameStartChar(doc,
val))
3625 while (xmlIsDocNameChar(doc,
val)) {
3631 while (
val == 0x20) {
3632 while (
val == 0x20) {
3637 if (!xmlIsDocNameStartChar(doc,
val))
3643 while (xmlIsDocNameChar(doc,
val)) {
3649 if (
val != 0)
return(0);
3665 return(xmlValidateNamesValueInternal(
NULL,
value));
3690 if (!xmlIsDocNameChar(doc,
val))
3695 while (xmlIsDocNameChar(doc,
val)) {
3700 if (
val != 0)
return(0);
3718 return(xmlValidateNmtokenValueInternal(
NULL,
value));
3748 if (!xmlIsDocNameChar(doc,
val))
3751 while (xmlIsDocNameChar(doc,
val)) {
3757 while (
val == 0x20) {
3758 while (
val == 0x20) {
3762 if (
val == 0)
return(1);
3764 if (!xmlIsDocNameChar(doc,
val))
3770 while (xmlIsDocNameChar(doc,
val)) {
3776 if (
val != 0)
return(0);
3794 return(xmlValidateNmtokensValueInternal(
NULL,
value));
3837 return(xmlValidateNamesValueInternal(doc,
value));
3842 return(xmlValidateNameValueInternal(doc,
value));
3845 return(xmlValidateNmtokensValueInternal(doc,
value));
3847 return(xmlValidateNmtokenValueInternal(doc,
value));
3880 return(xmlValidateAttributeValueInternal(
NULL,
type,
value));
3937 "ENTITY attribute %s reference an unknown entity \"%s\"\n",
3943 "ENTITY attribute %s reference an entity \"%s\" of wrong type\n",
3966 "ENTITIES attribute %s reference an unknown entity \"%s\"\n",
3972 "ENTITIES attribute %s reference an entity \"%s\" of wrong type\n",
3994 "NOTATION attribute %s reference an unknown notation \"%s\"\n",
4051 if (attrDecl !=
NULL)
4061 if (attrDecl !=
NULL)
4065 if (attrDecl ==
NULL)
4075 while (*
src == 0x20)
src++;
4078 while (*
src == 0x20)
src++;
4088 "standalone: %s on %s value had to be normalized based on external subset declaration\n",
4140 if (attrDecl ==
NULL)
4150 while (*
src == 0x20)
src++;
4153 while (*
src == 0x20)
src++;
4165 xmlValidateAttributeIdCallback(
void *payload,
void *
data,
4201 val = xmlValidateAttributeValueInternal(doc,
attr->atype,
4202 attr->defaultValue);
4205 "Syntax of default value for attribute %s of %s is not valid\n",
4216 "ID attribute %s of %s is not valid must be #IMPLIED or #REQUIRED\n",
4229 nbId = xmlScanIDAttributeDecl(
NULL,
elem, 0);
4241 xmlValidateAttributeIdCallback, &nbId);
4247 "Element %s has %d ID attribute defined in the internal subset : %s\n",
4253 extId = xmlScanIDAttributeDecl(
NULL,
elem, 0);
4257 "Element %s has %d ID attribute defined in the external subset : %s\n",
4259 }
else if (extId + nbId > 1) {
4261 "Element %s has ID attributes defined in the internal and external subset : %s\n",
4276 "Default value \"%s\" for attribute %s of %s is not among the enumerated set\n",
4312 #ifdef LIBXML_REGEXP_ENABLED 4314 ret = xmlValidBuildContentModel(ctxt,
elem);
4334 if (
cur->c1->prefix ==
NULL) {
4336 "Definition of %s has duplicate references of %s\n",
4340 "Definition of %s has duplicate references of %s:%s\n",
4351 if (
cur->c1->prefix ==
NULL) {
4353 "Definition of %s has duplicate references to %s\n",
4357 "Definition of %s has duplicate references to %s:%s\n",
4371 if ((tst !=
NULL ) && (tst !=
elem) &&
4376 "Redefinition of element %s\n",
4381 if ((tst !=
NULL ) && (tst !=
elem) &&
4386 "Redefinition of element %s\n",
4457 if (attrDecl ==
NULL) {
4475 if (attrDecl ==
NULL) {
4477 "No declaration for attribute %s of element %s\n",
4483 val = xmlValidateAttributeValueInternal(doc, attrDecl->
atype,
value);
4486 "Syntax of value for attribute %s of %s is not valid\n",
4495 "Value for attribute %s of %s is different from default \"%s\"\n",
4525 "Value \"%s\" for attribute %s of %s is not a declared Notation\n",
4537 "Value \"%s\" for attribute %s of %s is not among the enumerated notations\n",
4552 "Value \"%s\" for attribute %s of %s is not among the enumerated set\n",
4562 "Value for attribute %s of %s must be \"%s\"\n",
4568 ret &= xmlValidateAttributeValue2(ctxt, doc,
attr->
name,
4612 if (prefix !=
NULL) {
4637 if (attrDecl ==
NULL) {
4655 if (attrDecl ==
NULL) {
4658 "No declaration for attribute xmlns:%s of element %s\n",
4662 "No declaration for attribute xmlns of element %s\n",
4668 val = xmlValidateAttributeValueInternal(doc, attrDecl->
atype,
value);
4672 "Syntax of value for attribute xmlns:%s of %s is not valid\n",
4676 "Syntax of value for attribute xmlns of %s is not valid\n",
4687 "Value for attribute xmlns:%s of %s is different from default \"%s\"\n",
4691 "Value for attribute xmlns of %s is different from default \"%s\"\n",
4730 "Value \"%s\" for attribute xmlns:%s of %s is not a declared Notation\n",
4734 "Value \"%s\" for attribute xmlns of %s is not a declared Notation\n",
4748 "Value \"%s\" for attribute xmlns:%s of %s is not among the enumerated notations\n",
4752 "Value \"%s\" for attribute xmlns of %s is not among the enumerated notations\n",
4769 "Value \"%s\" for attribute xmlns:%s of %s is not among the enumerated set\n",
4773 "Value \"%s\" for attribute xmlns of %s is not among the enumerated set\n",
4785 "Value for attribute xmlns:%s of %s must be \"%s\"\n",
4789 "Value for attribute xmlns of %s must be \"%s\"\n",
4797 ret &= xmlValidateAttributeValue2(ctxt, doc,
ns->
prefix,
4800 ret &= xmlValidateAttributeValue2(ctxt, doc,
BAD_CAST "xmlns",
4807 #ifndef LIBXML_REGEXP_ENABLED 4821 switch (
child->type) {
4857 int determinist = 1;
4859 NODE = xmlValidateSkipIgnorable(NODE);
4860 if ((NODE ==
NULL) && (CONT ==
NULL))
4862 if ((NODE ==
NULL) &&
4867 if (CONT ==
NULL)
return(-1);
4880 if (
STATE == ROLLBACK_PARENT) {
4881 DEBUG_VALID_MSG(
"restored parent branch");
4882 DEBUG_VALID_STATE(NODE, CONT)
4887 DEBUG_VALID_STATE(NODE, CONT)
4892 if ((CONT !=
NULL) &&
4893 ((CONT->parent ==
NULL) ||
4898 DEBUG_VALID_MSG(
"saving parent branch");
4899 if (vstateVPush(ctxt, CONT, NODE, DEPTH, OCCURS, ROLLBACK_PARENT) < 0)
4907 switch (CONT->type) {
4910 DEBUG_VALID_MSG(
"pcdata failed no node");
4915 DEBUG_VALID_MSG(
"pcdata found, skip to next");
4922 NODE = xmlValidateSkipIgnorable(NODE);
4923 if ((NODE !=
NULL) &&
4926 }
while ((NODE !=
NULL) &&
4933 DEBUG_VALID_MSG(
"pcdata failed");
4940 DEBUG_VALID_MSG(
"element failed no node");
4947 if ((NODE->ns ==
NULL) || (NODE->ns->prefix ==
NULL)) {
4949 }
else if (CONT->prefix ==
NULL) {
4956 DEBUG_VALID_MSG(
"element found, skip to next");
4963 NODE = xmlValidateSkipIgnorable(NODE);
4964 if ((NODE !=
NULL) &&
4967 }
while ((NODE !=
NULL) &&
4972 DEBUG_VALID_MSG(
"element failed");
4982 if ((NODE ==
NULL) ||
4988 if ((NODE->ns ==
NULL) || (NODE->ns->prefix ==
NULL)) {
4989 ret = (CONT->c1->prefix ==
NULL);
4990 }
else if (CONT->c1->prefix ==
NULL) {
5005 DEBUG_VALID_MSG(
"saving 'or' branch");
5006 if (vstateVPush(ctxt, CONT->c2, NODE, (
unsigned char)(DEPTH + 1),
5007 OCCURS, ROLLBACK_OR) < 0)
5019 if ((NODE ==
NULL) ||
5025 if ((NODE->ns ==
NULL) || (NODE->ns->prefix ==
NULL)) {
5026 ret = (CONT->c1->prefix ==
NULL);
5027 }
else if (CONT->c1->prefix ==
NULL) {
5047 DEBUG_VALID_MSG(
"error found returning");
5051 while (CONT !=
NULL) {
5057 switch (CONT->ocur) {
5062 DEBUG_VALID_MSG(
"Once branch failed, rollback");
5063 if (vstateVPop(ctxt) < 0 ) {
5064 DEBUG_VALID_MSG(
"exhaustion, failed");
5071 if (OCCURRENCE == 0) {
5073 DEBUG_VALID_MSG(
"Plus branch failed, rollback");