- tree.c: fixed #53388 with the provided patch
Daniel
diff --git a/tree.c b/tree.c
index 28af567..fe198d4 100644
--- a/tree.c
+++ b/tree.c
@@ -2673,7 +2673,7 @@
 	        xmlNodePtr root = ret;
 
 		while (root->parent != NULL) root = root->parent;
-		xmlNewNs(root, ns->href, ns->prefix);
+		ret->ns = xmlNewNs(root, ns->href, ns->prefix);
 	    }
 	} else {
 	    /*