=== modified file 'libxslt/namespaces.c'
--- old/libxslt/namespaces.c	2008-04-03 05:34:12 +0000
+++ new/libxslt/namespaces.c	2008-11-30 19:25:05 +0000
@@ -577,20 +577,24 @@
 
 declare_new_prefix:
     /*
     * Fallback: we need to generate a new prefix and declare the namespace
     * on the result element.
     */
     {
 	xmlChar pref[30];
 	int counter = 1;
 
+	if (nsPrefix == NULL) {
+	    nsPrefix = "";
+	}
+
 	do {
 	    snprintf((char *) pref, 30, "%s_%d", nsPrefix, counter++);
 	    ns = xmlSearchNs(target->doc, target, BAD_CAST pref);
 	    if (counter > 1000) {
 		xsltTransformError(ctxt, NULL, invocNode,
 		    "Internal error in xsltAcquireResultInScopeNs(): "
 		    "Failed to compute a unique ns-prefix for the "
 		    "generated element");
 		return(NULL);
 	    }

