1
0
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:
Daniel Veillard
2003-05-09 19:38:15 +00:00
parent a067e656fd
commit 37fc84d155
31 changed files with 132 additions and 3 deletions

View File

@ -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;