patch from Aleksey Sanin reflecting a change in the ExcC14N specification

* c14n.c: patch from Aleksey Sanin reflecting a change in the
  ExcC14N specification
Daniel
diff --git a/ChangeLog b/ChangeLog
index 4bd179d..5790ad7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Apr 18 23:00:02 CEST 2002 Daniel Veillard <daniel@veillard.com>
+
+	* c14n.c: patch from Aleksey Sanin reflecting a change in the
+	  ExcC14N specification
+
 Thu Apr 18 18:38:30 CEST 2002 Daniel Veillard <daniel@veillard.com>
 
 	* tree.c: patch from Markus Henke, fix for recursive entities.
diff --git a/c14n.c b/c14n.c
index 9ff189e..8be82bc 100644
--- a/c14n.c
+++ b/c14n.c
@@ -425,15 +425,13 @@
     /*
      * First of all, add all namespaces required by current node
      * (i.e. node namespace and all attribute namespaces)
-     * todo: do we need to check for default "xml:" namespace
+     * we also need to check for default "xml:" namespace
      */
     ns = (cur->ns != NULL) ? cur->ns : xmlSearchNs(ctx->doc, cur, NULL);
     if ((ns != NULL) && (!xmlC14NIsXmlNs(ns)) &&
-        (xmlListSearch(list, ns) == NULL)) {
-        if (!xmlExcC14NIsRendered(ctx, ns)) {
+	(xmlListSearch(list, ns) == NULL) && !xmlExcC14NIsRendered(ctx, ns)) {
             xmlListInsert(list, ns);
             xmlXPathNodeSetAdd(ctx->ns_rendered, (xmlNodePtr) ns);
-        }
     }
     attr = cur->properties;
     while (attr != NULL) {
@@ -443,10 +441,10 @@
 	   * do not apply directly to attributes")	 
          */
         if ((attr->ns != NULL) && xmlC14NIsVisible(ctx, attr) && 
-        			 (xmlListSearch(list, attr->ns) == NULL) && 
-				 (!xmlExcC14NIsRendered(ctx, attr->ns))) {
-            xmlListInsert(list, attr->ns);
-            xmlXPathNodeSetAdd(ctx->ns_rendered, (xmlNodePtr) attr->ns);
+	    (!xmlC14NIsXmlNs(attr->ns)) && 
+            (xmlListSearch(list, attr->ns) == NULL) && (!xmlExcC14NIsRendered(ctx, attr->ns))) {
+        	xmlListInsert(list, attr->ns);
+        	xmlXPathNodeSetAdd(ctx->ns_rendered, (xmlNodePtr) attr->ns);
         }
         attr = attr->next;
     }