*** libxml2-2.6.29/xmlschemas.c	Wed Mar 14 10:48:00 2007
--- libxml2-2.6.29-fixIDC/xmlschemas.c	Wed Jul 11 17:31:37 2007
***************
*** 21898,21903 ****
--- 21898,21917 ----
  }
  
  /**
+  * 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
   *
***************
*** 27893,27905 ****
  	*/
  	pctxt->ownsConstructor = 1;
      }	
!     /*
!     * Augment the IDC definitions.
      */
!     if (vctxt->schema->idcDef != NULL) {
! 	xmlHashScan(vctxt->schema->idcDef,
! 	    (xmlHashScanner) xmlSchemaAugmentIDC, vctxt);
!     }
      return(0);
  }
  
--- 27907,27918 ----
  	*/
  	pctxt->ownsConstructor = 1;
      }	
!     /* 
!     * Augment the IDC definitions for the main schema and all imported ones 
!     * NOTE: main schema if the first in the imported list
      */
!     xmlHashScan(vctxt->schema->schemasImports,(xmlHashScanner)xmlSchemaAugmentImportedIDC, vctxt);
!     
      return(0);
  }
  
