diff -Naur a/xmlschemas.c b/xmlschemas.c
--- a/xmlschemas.c	2013-11-25 15:57:46.000000000 +0530
+++ b/xmlschemas.c	2013-11-25 15:59:18.000000000 +0530
@@ -10755,7 +10755,7 @@
 	    XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
 	    NULL, node,
 	    xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI),
-	    NULL, namespaceName, NULL, NULL, NULL);
+	    NULL, schemaLocation, NULL, NULL, NULL);
 	return (pctxt->err);
     }
     /*
