comparison xslt.t @ 211:ee8fee3c4ae8

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 23 Mar 2012 19:57:44 +0400
parents 6bac00bba8d4
children ba992cfdc606
comparison
equal deleted inserted replaced
210:a5f810eb87a2 211:ee8fee3c4ae8
44 location /x1 { 44 location /x1 {
45 xslt_stylesheet %%TESTDIR%%/test.xslt; 45 xslt_stylesheet %%TESTDIR%%/test.xslt;
46 } 46 }
47 location /x2 { 47 location /x2 {
48 xslt_stylesheet %%TESTDIR%%/test.xslt 48 xslt_stylesheet %%TESTDIR%%/test.xslt
49 param1='value1':param2=root param3='value%33'; 49 param1='value1':param2=/root param3='value%33';
50 } 50 }
51 location /x3 { 51 location /x3 {
52 xml_entities %%TESTDIR%%/entities.dtd; 52 xml_entities %%TESTDIR%%/entities.dtd;
53 xslt_stylesheet %%TESTDIR%%/test.xslt; 53 xslt_stylesheet %%TESTDIR%%/test.xslt;
54 } 54 }
75 <xsl:template match="/"> 75 <xsl:template match="/">
76 test xslt result 76 test xslt result
77 param1=<xsl:value-of select="$param1"/> 77 param1=<xsl:value-of select="$param1"/>
78 param2=<xsl:value-of select="$param2"/> 78 param2=<xsl:value-of select="$param2"/>
79 param3=<xsl:value-of select="$param3"/> 79 param3=<xsl:value-of select="$param3"/>
80 data=<xsl:value-of select="root"/> 80 data=<xsl:value-of select="/root"/>
81 </xsl:template> 81 </xsl:template>
82 82
83 </xsl:stylesheet> 83 </xsl:stylesheet>
84 84
85 EOF 85 EOF
88 88
89 <xsl:stylesheet version="1.0" 89 <xsl:stylesheet version="1.0"
90 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 90 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
91 91
92 <xsl:template match="/"> 92 <xsl:template match="/">
93 <root>other <xsl:value-of select="root"/></root> 93 <root>other <xsl:value-of select="/root"/></root>
94 </xsl:template> 94 </xsl:template>
95 95
96 </xsl:stylesheet> 96 </xsl:stylesheet>
97 97
98 EOF 98 EOF