From 3d3d33c0188247a5c32a8f3292b1def7c328629d Mon Sep 17 00:00:00 2001
From: Christian Stocker <chregu@php.net>
Date: Sat, 13 Dec 2003 11:36:14 +0000
Subject: [PATCH] fix for bug #26595 "`XSLT_NAMESPACE' undeclared"

---
 ext/domxml/php_domxml.c | 33 ++++++++++++++++-----------------
 1 file changed, 16 insertions(+), 17 deletions(-)

diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c
index d5936f7fc2..7a159fc6d6 100644
--- a/ext/domxml/php_domxml.c
+++ b/ext/domxml/php_domxml.c
@@ -200,9 +200,8 @@ zend_class_entry *xpathobject_class_entry;
 #endif
 #if HAVE_DOMXSLT
 zend_class_entry *domxsltstylesheet_class_entry;
-#endif
-
 static int xslt_has_xsl_keys (xmlDocPtr doc);
+#endif
 
 static int node_attributes(zval **attributes, xmlNode *nodep TSRMLS_DC);
 static int node_children(zval **children, xmlNode *nodep TSRMLS_DC);
@@ -4683,21 +4682,6 @@ static int node_namespace(zval **attributes, xmlNode *nodep TSRMLS_DC)
 /* }}} */
 #endif
 
-static int xslt_has_xsl_keys (xmlDocPtr doc) {
-	
-	xmlNode *nodep;
-	nodep = xmlDocGetRootElement(doc)->children;
-	while (nodep) {
-		if (nodep->type == XML_ELEMENT_NODE && xmlStrEqual(nodep->name, "key") && xmlStrEqual(nodep->ns->href, XSLT_NAMESPACE)) {
-				return 1;
-				break;
-			}
-		nodep = nodep->next;
-	}
-	return 0;
-}
-
-
 /* {{{ int node_attributes(zval **attributes, int node)
    Returns list of children nodes */
 static int node_attributes(zval **attributes, xmlNode *nodep TSRMLS_DC)
@@ -5341,6 +5325,21 @@ static char **php_domxslt_make_params(zval *idvars, int xpath_params TSRMLS_DC)
 }
 /* }}} */
 
+static int xslt_has_xsl_keys (xmlDocPtr doc) {
+	
+	xmlNode *nodep;
+	nodep = xmlDocGetRootElement(doc)->children;
+	while (nodep) {
+		if (nodep->type == XML_ELEMENT_NODE && xmlStrEqual(nodep->name, "key") && xmlStrEqual(nodep->ns->href, XSLT_NAMESPACE)) {
+				return 1;
+				break;
+			}
+		nodep = nodep->next;
+	}
+	return 0;
+}
+
+
 /* {{{ proto object domxml_xslt_process(object xslstylesheet, object xmldoc [, array xslt_parameters [, bool xpath_parameters [, string profileFilename]]])
    Perform an XSLT transformation */
 PHP_FUNCTION(domxml_xslt_process)
-- 
2.40.0