fixed xml attributes processing bug in exc c14n added --exc-c14n command
* c14n.c: fixed xml attributes processing bug in exc c14n
* xmllint.c: added --exc-c14n command line option
diff --git a/c14n.c b/c14n.c
index 0088d16..5f18581 100644
--- a/c14n.c
+++ b/c14n.c
@@ -793,7 +793,7 @@
* default namespace (XML Namespaces: "default namespaces
* do not apply directly to attributes")
*/
- if((attr->ns != NULL) && xmlC14NIsVisible(ctx, attr, cur)) {
+ if((attr->ns != NULL) && !xmlC14NIsXmlNs(attr->ns) && xmlC14NIsVisible(ctx, attr, cur)) {
already_rendered = xmlExcC14NVisibleNsStackFind(ctx->ns_rendered, attr->ns, ctx);
xmlC14NVisibleNsStackAdd(ctx->ns_rendered, attr->ns, cur);
if(!already_rendered && visible) {