summaryrefslogtreecommitdiff
path: root/chromium/third_party/libxml/src/valid.c
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/libxml/src/valid.c')
-rw-r--r--chromium/third_party/libxml/src/valid.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/chromium/third_party/libxml/src/valid.c b/chromium/third_party/libxml/src/valid.c
index dc2d175df61..182ffed1df2 100644
--- a/chromium/third_party/libxml/src/valid.c
+++ b/chromium/third_party/libxml/src/valid.c
@@ -835,7 +835,7 @@ xmlValidBuildContentModel(xmlValidCtxtPtr ctxt, xmlElementPtr elem) {
xmlSnprintfElementContent(expr, 5000, elem->content, 1);
xmlErrValidNode(ctxt, (xmlNodePtr) elem,
XML_DTD_CONTENT_NOT_DETERMINIST,
- "Content model of %s is not determinist: %s\n",
+ "Content model of %s is not deterministic: %s\n",
elem->name, BAD_CAST expr, NULL);
#ifdef DEBUG_REGEXP_ALGO
xmlRegexpPrint(stderr, elem->contModel);
@@ -4906,6 +4906,7 @@ cont:
*/
if ((CONT != NULL) &&
((CONT->parent == NULL) ||
+ (CONT->parent == (xmlElementContentPtr) 1) ||
(CONT->parent->type != XML_ELEMENT_CONTENT_OR)) &&
((CONT->ocur == XML_ELEMENT_CONTENT_MULT) ||
(CONT->ocur == XML_ELEMENT_CONTENT_OPT) ||
@@ -5158,7 +5159,8 @@ analyze:
* Then act accordingly at the parent level
*/
RESET_OCCURRENCE;
- if (CONT->parent == NULL)
+ if ((CONT->parent == NULL) ||
+ (CONT->parent == (xmlElementContentPtr) 1))
break;
switch (CONT->parent->type) {
@@ -5440,9 +5442,13 @@ fail:
STATE = 0;
ret = xmlValidateElementType(ctxt);
if ((ret == -3) && (warn)) {
- xmlErrValidWarning(ctxt, child, XML_DTD_CONTENT_NOT_DETERMINIST,
- "Content model for Element %s is ambiguous\n",
- name, NULL, NULL);
+ char expr[5000];
+ expr[0] = 0;
+ xmlSnprintfElementContent(expr, 5000, elemDecl->content, 1);
+ xmlErrValidNode(ctxt, (xmlNodePtr) elemDecl,
+ XML_DTD_CONTENT_NOT_DETERMINIST,
+ "Content model of %s is not deterministic: %s\n",
+ name, BAD_CAST expr, NULL);
} else if (ret == -2) {
/*
* An entities reference appeared at this level.
@@ -5663,6 +5669,7 @@ done:
return(ret);
}
+#ifdef LIBXML_REGEXP_ENABLED
/**
* xmlValidateCheckMixed:
* @ctxt: the validation context
@@ -5728,6 +5735,7 @@ xmlValidateCheckMixed(xmlValidCtxtPtr ctxt,
}
return(0);
}
+#endif /* LIBXML_REGEXP_ENABLED */
/**
* xmlValidGetElemDecl: