mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
Fix an XSD error when generating internal automata
When generating a sequence add an extra epsilon transition to avoid further constructs from entering via the last state Bug reported by Johan Corveleyn <jcorvel@gmail.com>
This commit is contained in:
@@ -12957,6 +12957,15 @@ xmlSchemaBuildAContentModel(xmlSchemaParserCtxtPtr pctxt,
|
||||
if (tmp2 != 1) ret = 0;
|
||||
sub = sub->next;
|
||||
}
|
||||
|
||||
/*
|
||||
* epsilon needed to block previous trans from
|
||||
* being allowed to enter back from another
|
||||
* construct
|
||||
*/
|
||||
pctxt->state = xmlAutomataNewEpsilon(pctxt->am,
|
||||
pctxt->state, NULL);
|
||||
|
||||
if (particle->minOccurs == 0) {
|
||||
xmlAutomataNewEpsilon(pctxt->am, oldstate,
|
||||
pctxt->state);
|
||||
|
||||
Reference in New Issue
Block a user