=== modified file 'libxslt/xslt.c'
--- old/libxslt/xslt.c	2008-08-01 07:27:18 +0000
+++ new/libxslt/xslt.c	2008-11-20 01:30:05 +0000
@@ -4927,31 +4927,32 @@
 		}
 		delete = cur;
 		goto skip_children;
 	    }
 	}
 	else if ((cur->ns != NULL) && (style->nsDefs != NULL) &&
 	    (xsltCheckExtPrefix(style, cur->ns->prefix)))
 	{
 	    /*
 	     * okay this is an extension element compile it too
 	     */
 	    xsltStylePreCompute(style, cur);
-	} else {
+	}
+	else if (cur->type == XML_ELEMENT_NODE)
+	{
 	    /*
 	     * This is an element which will be output as part of the
 	     * template exectution, precompile AVT if found.
 	     */
-	    if ((cur->ns == NULL) && (style->defaultAlias != NULL) &&
-	    		(cur->type == XML_ELEMENT_NODE)) {
+	    if ((cur->ns == NULL) && (style->defaultAlias != NULL)) {
 		cur->ns = xmlSearchNsByHref(cur->doc, cur,
 			style->defaultAlias);
 	    }
 	    if (cur->properties != NULL) {
 	        xmlAttrPtr attr = cur->properties;
 
 		while (attr != NULL) {
 		    xsltCompileAttr(style, attr);
 		    attr = attr->next;
 		}
 	    }
 	}

