Tests: fix xslt tests for CentOS 5. Old libxslt used on CentOS 5 (libxml 2.6.26, libxslt 1.1.17) handlex XPath queries in top-level elements incorrectly if relative paths are used. Use paths from document root instead.
diff --git a/xslt.t b/xslt.t index d893163..d5d4b1b 100644 --- a/xslt.t +++ b/xslt.t
@@ -46,7 +46,7 @@ } location /x2 { xslt_stylesheet %%TESTDIR%%/test.xslt - param1='value1':param2=root param3='value%33'; + param1='value1':param2=/root param3='value%33'; } location /x3 { xml_entities %%TESTDIR%%/entities.dtd; @@ -77,7 +77,7 @@ param1=<xsl:value-of select="$param1"/> param2=<xsl:value-of select="$param2"/> param3=<xsl:value-of select="$param3"/> -data=<xsl:value-of select="root"/> +data=<xsl:value-of select="/root"/> </xsl:template> </xsl:stylesheet> @@ -90,7 +90,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> -<root>other <xsl:value-of select="root"/></root> +<root>other <xsl:value-of select="/root"/></root> </xsl:template> </xsl:stylesheet>
diff --git a/xslt_params.t b/xslt_params.t index bbcd9c5..8aab026 100644 --- a/xslt_params.t +++ b/xslt_params.t
@@ -43,17 +43,17 @@ location /x1 { xslt_stylesheet %%TESTDIR%%/test.xslt - param1='value1':param2=root param3='value%33'; + param1='value1':param2=/root param3='value%33'; } location /x2 { xslt_stylesheet %%TESTDIR%%/test.xslt; xslt_param param1 "'value1'"; - xslt_param param2 "root"; + xslt_param param2 "/root"; xslt_string_param param3 "value3"; } location /x3 { xslt_stylesheet %%TESTDIR%%/test.xslt - param1='value1':param2=root; + param1='value1':param2=/root; xslt_string_param param3 "value3"; } }