Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > media > main-src > by-pkgid > 6709f41e1c9c0ac6e610e609c299d4fb > files > 24

libxml2-2.6.26-2.1.12.el5_7.2.src.rpm

commit 3888f472631b7b6005aae57e7ea58b917253a2a8
Author: Daniel Veillard <veillard@src.gnome.org>
Date:   Thu Aug 23 09:29:03 2007 +0000

    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 @@ xmlSchemaAugmentIDC(xmlSchemaIDCPtr idcDef,
 }
 
 /**
+ * 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 @@ xmlSchemaPreRun(xmlSchemaValidCtxtPtr vctxt) {
 	*/
 	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);
 }