mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-19 14:50:07 +03:00
Moved execution of xmlSchemaCheckDefaults to xmlSchemaTypeFixup; this
* xmlschemas.c: Moved execution of xmlSchemaCheckDefaults to xmlSchemaTypeFixup; this ensures facets of inherited types to be checked prior to facets of derived types - which caused a seg fault otherwise (bug #158216, reported by Frans Englich).
This commit is contained in:
parent
094dd86c13
commit
b884124c34
@ -1,3 +1,10 @@
|
||||
Mon Nov 15 13:04:28 CET 2004 Kasimier Buchcik <libxml2-cvs@cazic.net>
|
||||
|
||||
* xmlschemas.c: Moved execution of xmlSchemaCheckDefaults to
|
||||
xmlSchemaTypeFixup; this ensures facets of inherited types to be checked
|
||||
prior to facets of derived types - which caused a seg fault otherwise
|
||||
(bug #158216, reported by Frans Englich).
|
||||
|
||||
Sun Nov 14 22:23:18 HKT 2004 William Brack <wbrack@mmm.com.hk>
|
||||
|
||||
* gentest.py, testapi.c: further enhancement, now all
|
||||
|
13
xmlschemas.c
13
xmlschemas.c
@ -343,6 +343,9 @@ xmlSchemaHasElemOrCharContent(xmlNodePtr node);
|
||||
static int
|
||||
xmlSchemaParseImport(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
|
||||
xmlNodePtr node);
|
||||
static void
|
||||
xmlSchemaCheckDefaults(xmlSchemaTypePtr typeDecl,
|
||||
xmlSchemaParserCtxtPtr ctxt, const xmlChar * name);
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
@ -12336,6 +12339,7 @@ xmlSchemaTypeFixup(xmlSchemaTypePtr item,
|
||||
item->subtypes->contentType;
|
||||
}
|
||||
xmlSchemaBuildAttributeValidation(ctxt, item);
|
||||
xmlSchemaCheckDefaults(item, ctxt, item->name);
|
||||
ctxt->ctxtType = ctxtType;
|
||||
break;
|
||||
}
|
||||
@ -12489,6 +12493,7 @@ xmlSchemaTypeFixup(xmlSchemaTypePtr item,
|
||||
* Check constraints.
|
||||
*/
|
||||
xmlSchemaCheckSRCSimpleType(ctxt, item);
|
||||
xmlSchemaCheckDefaults(item, ctxt, item->name);
|
||||
ctxt->ctxtType = ctxtType;
|
||||
break;
|
||||
case XML_SCHEMA_TYPE_SEQUENCE:
|
||||
@ -13534,8 +13539,7 @@ xmlSchemaParse(xmlSchemaParserCtxtPtr ctxt)
|
||||
/*
|
||||
* Then check the defaults part of the type like facets values
|
||||
*/
|
||||
xmlHashScan(ret->typeDecl, (xmlHashScanner) xmlSchemaCheckDefaults,
|
||||
ctxt);
|
||||
/* OLD: xmlHashScan(ret->typeDecl, (xmlHashScanner) xmlSchemaCheckDefaults, ctxt); */
|
||||
|
||||
/*
|
||||
* Validate the value constraint of attribute declarations/uses.
|
||||
@ -14066,8 +14070,10 @@ xmlSchemaPostSchemaAssembleFixup(xmlSchemaParserCtxtPtr ctxt)
|
||||
}
|
||||
/*
|
||||
* Check facet values. Note that facets are
|
||||
* hold by complex and simple type components only.
|
||||
* hold by simple type components only (and
|
||||
* by complex types in the current implementation).
|
||||
*/
|
||||
/* OLD:
|
||||
for (i = 0; i < nbItems; i++) {
|
||||
item = items[i];
|
||||
switch (item->type) {
|
||||
@ -14079,6 +14085,7 @@ xmlSchemaPostSchemaAssembleFixup(xmlSchemaParserCtxtPtr ctxt)
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
/*
|
||||
* Build the content model for complex types.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user