diff -ru libxslt-1.1.15_orig/libxslt/transform.c libxslt-1.1.15/libxslt/transform.c
--- libxslt-1.1.15_orig/libxslt/transform.c	2005-08-31 12:47:15.000000000 +0200
+++ libxslt-1.1.15/libxslt/transform.c	2005-11-29 18:42:20.000000000 +0100
@@ -3021,6 +3021,10 @@
 	if (res->type != XPATH_STRING)
 	    res = xmlXPathConvertString(res);
 	if (res->type == XPATH_STRING) {
+	    if (xmlStrlen(res->stringval) == 0) {
+		xmlXPathFreeObject(res);
+		return;
+	    }
 	    copy = xsltCopyTextString(ctxt, ctxt->insert, res->stringval,
 		               comp->noescape);
 	}
