fixed bug in exc-c14n namespace visibility + test case 319367(bug #319367)
diff --git a/c14n.c b/c14n.c
index 32c7004..33a5803 100644
--- a/c14n.c
+++ b/c14n.c
@@ -802,7 +802,7 @@
 	    if(xmlStrlen(attr->ns->prefix) == 0) {
 		has_empty_ns = 1;
 	    }
-	} else if(attr->ns == NULL) {
+	} else if((attr->ns != NULL) && (xmlStrlen(attr->ns->prefix) == 0) && (xmlStrlen(attr->ns->href) == 0)) {
 	    has_visibly_utilized_empty_ns = 1;
 	}
     }