diff --git a/xmlschemas.c b/xmlschemas.c index d6a47e4..6d317b3 100644 --- a/xmlschemas.c +++ b/xmlschemas.c @@ -26063,6 +26063,11 @@ xmlSchemaValidatorPopElem(xmlSchemaValidCtxtPtr vctxt) "AUTOMATON create on '%s'\n", inode->localName); #endif } + + /* + * Do not check further content if the node has been nilled + */ + if (!INODE_NILLED(inode)) { /* * Get hold of the still expected content, since a further * call to xmlRegExecPushString() will loose this information. @@ -26070,7 +26075,7 @@ xmlSchemaValidatorPopElem(xmlSchemaValidCtxtPtr vctxt) xmlRegExecNextValues(inode->regexCtxt, &nbval, &nbneg, &values[0], &terminal); ret = xmlRegExecPushString(inode->regexCtxt, NULL, NULL); - if ((ret<0) || ((ret==0) && (!INODE_NILLED(inode)))) { + if (ret<0) { /* * Still missing something. */ @@ -26087,17 +26092,17 @@ xmlSchemaValidatorPopElem(xmlSchemaValidCtxtPtr vctxt) inode->localName); #endif } else { + ret = 0; + } + } /* * Content model is satisfied. */ - ret = 0; #ifdef DEBUG_AUTOMATA xmlGenericError(xmlGenericErrorContext, "AUTOMATON succeeded on '%s'\n", inode->localName); #endif - } - } } if (inode->typeDef->contentType == XML_SCHEMA_CONTENT_ELEMENTS)