mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
fixing bug #104081 with xs:all with an element holding minOccurs="0" added
* xmlschemas.c: fixing bug #104081 with xs:all with an element holding minOccurs="0" * test/schemas/all_* result/schemas/all_*: added some regression tests for that bug * xmllint.c xmlreader.c: patches from Joerg Schmitz-Linneweber and Garry Pennington to compile without schemas support. Daniel
This commit is contained in:
11
xmlschemas.c
11
xmlschemas.c
@ -3350,9 +3350,14 @@ xmlSchemaBuildAContentModel(xmlSchemaTypePtr type,
|
||||
elem = (xmlSchemaElementPtr) subtypes;
|
||||
|
||||
/* TODO : handle the namespace too */
|
||||
xmlAutomataNewOnceTrans(ctxt->am, ctxt->state, ctxt->state,
|
||||
elem->name, elem->minOccurs, elem->maxOccurs,
|
||||
subtypes);
|
||||
if ((elem->minOccurs == 1) && (elem->maxOccurs == 1)) {
|
||||
xmlAutomataNewOnceTrans(ctxt->am, ctxt->state, ctxt->state,
|
||||
elem->name, 1, 1, subtypes);
|
||||
} else {
|
||||
xmlAutomataNewCountTrans(ctxt->am, ctxt->state, ctxt->state,
|
||||
elem->name, elem->minOccurs,
|
||||
elem->maxOccurs, subtypes);
|
||||
}
|
||||
subtypes = subtypes->next;
|
||||
}
|
||||
lax = type->minOccurs == 0;
|
||||
|
Reference in New Issue
Block a user