1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

implementing xs:all with minOccurs = 0 added more tests covering xs:all

* xmlregexp.c xmlschemas.c include/libxml/xmlautomata.h:
  implementing xs:all with minOccurs = 0
* tes/schemas/* result/schemas/*: added more tests covering
  xs:all
Daniel
This commit is contained in:
Daniel Veillard
2002-04-20 17:38:48 +00:00
parent 8a001f62c1
commit 441bc32e31
37 changed files with 456 additions and 51 deletions

View File

@ -3037,10 +3037,10 @@ xmlSchemaBuildAContentModel(xmlSchemaTypePtr type,
break;
}
case XML_SCHEMA_TYPE_ALL: {
xmlAutomataStatePtr end;
xmlAutomataStatePtr start;
xmlSchemaTypePtr subtypes;
xmlSchemaElementPtr elem = (xmlSchemaElementPtr) type;
int lax;
subtypes = type->subtypes;
if (subtypes == NULL)
@ -3056,7 +3056,9 @@ xmlSchemaBuildAContentModel(xmlSchemaTypePtr type,
subtypes);
subtypes = subtypes->next;
}
ctxt->state = xmlAutomataNewAllTrans(ctxt->am, ctxt->state, NULL);
lax = type->minOccurs == 0;
ctxt->state = xmlAutomataNewAllTrans(ctxt->am, ctxt->state, NULL,
lax);
TODO
break;
}
@ -3895,6 +3897,11 @@ static int
xmlSchemaRegisterAttributes(xmlSchemaValidCtxtPtr ctxt,
xmlAttrPtr attrs) {
while (attrs != NULL) {
if ((attrs->ns != NULL) &&
(xmlStrEqual(attrs->ns->href, xmlSchemaInstanceNs))) {
attrs = attrs->next;
continue;
}
if (ctxt->attrNr >= ctxt->attrMax) {
xmlSchemaAttrStatePtr tmp;