applied patch from Frank Gross fixing Schemas IDC import bug #455953 and
* xmlschemas.c test/schemas/*455953* result/schemas/bug455953*:
applied patch from Frank Gross fixing Schemas IDC import bug
#455953 and also add the test to the regression suite
Daniel
svn path=/trunk/; revision=3652
diff --git a/xmlschemas.c b/xmlschemas.c
index f38cdc3..f6b86dd 100644
--- a/xmlschemas.c
+++ b/xmlschemas.c
@@ -21906,6 +21906,20 @@
}
/**
+ * xmlSchemaAugmentImportedIDC:
+ * @imported: the imported schema
+ *
+ * Creates an augmented IDC definition for the imported schema.
+ */
+static void
+xmlSchemaAugmentImportedIDC(xmlSchemaImportPtr imported, xmlSchemaValidCtxtPtr vctxt) {
+ if (imported->schema->idcDef != NULL) {
+ xmlHashScan(imported->schema->idcDef ,
+ (xmlHashScanner) xmlSchemaAugmentIDC, vctxt);
+ }
+}
+
+/**
* xmlSchemaIDCNewBinding:
* @idcDef: the IDC definition of this binding
*
@@ -27901,13 +27915,12 @@
*/
pctxt->ownsConstructor = 1;
}
- /*
- * Augment the IDC definitions.
+ /*
+ * Augment the IDC definitions for the main schema and all imported ones
+ * NOTE: main schema if the first in the imported list
*/
- if (vctxt->schema->idcDef != NULL) {
- xmlHashScan(vctxt->schema->idcDef,
- (xmlHashScanner) xmlSchemaAugmentIDC, vctxt);
- }
+ xmlHashScan(vctxt->schema->schemasImports,(xmlHashScanner)xmlSchemaAugmentImportedIDC, vctxt);
+
return(0);
}