mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-28 00:21:53 +03:00
fixed a bug reported by Jeff Goff, the determinism was tested before
* xmlregexp.c xmlschemas.c: fixed a bug reported by Jeff Goff, the determinism was tested before eliminating the epsilon transitions :-( Daniel
This commit is contained in:
@ -3262,20 +3262,20 @@ xmlSchemaBuildContentModel(xmlSchemaElementPtr elem,
|
||||
start = ctxt->state = xmlAutomataGetInitState(ctxt->am);
|
||||
xmlSchemaBuildAContentModel(elem->subtypes, ctxt, name);
|
||||
xmlAutomataSetFinalState(ctxt->am, ctxt->state);
|
||||
elem->contModel = xmlAutomataCompile(ctxt->am);
|
||||
if (!xmlAutomataIsDeterminist(ctxt->am)) {
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"Content model of %s is not determinist:\n", name);
|
||||
elem->contModel = xmlAutomataCompile(ctxt->am);
|
||||
ctxt->err = XML_SCHEMAS_ERR_NOTDETERMINIST;
|
||||
ctxt->state = NULL;
|
||||
} else {
|
||||
elem->contModel = xmlAutomataCompile(ctxt->am);
|
||||
#ifdef DEBUG_CONTENT
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"Content model of %s:\n", name);
|
||||
xmlRegexpPrint(stderr, elem->contModel);
|
||||
#endif
|
||||
ctxt->state = NULL;
|
||||
}
|
||||
ctxt->state = NULL;
|
||||
xmlFreeAutomata(ctxt->am);
|
||||
ctxt->am = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user