Changeset 211:ee8fee3c4ae8 in nginx-tests


Ignore:
Timestamp:
03/23/12 15:57:44 (8 years ago)
Author:
Maxim Dounin <mdounin@…>
Branch:
default
Phase:
public
Message:

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.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • xslt.t

    r208 r211  
    4747        location /x2 {
    4848            xslt_stylesheet %%TESTDIR%%/test.xslt
    49                             param1='value1':param2=root param3='value%33';
     49                            param1='value1':param2=/root param3='value%33';
    5050        }
    5151        location /x3 {
     
    7878param2=<xsl:value-of select="$param2"/>
    7979param3=<xsl:value-of select="$param3"/>
    80 data=<xsl:value-of select="root"/>
     80data=<xsl:value-of select="/root"/>
    8181</xsl:template>
    8282
     
    9191
    9292<xsl:template match="/">
    93 <root>other <xsl:value-of select="root"/></root>
     93<root>other <xsl:value-of select="/root"/></root>
    9494</xsl:template>
    9595
  • xslt_params.t

    r208 r211  
    4444        location /x1 {
    4545            xslt_stylesheet %%TESTDIR%%/test.xslt
    46                             param1='value1':param2=root param3='value%33';
     46                            param1='value1':param2=/root param3='value%33';
    4747        }
    4848        location /x2 {
    4949            xslt_stylesheet %%TESTDIR%%/test.xslt;
    5050            xslt_param param1 "'value1'";
    51             xslt_param param2 "root";
     51            xslt_param param2 "/root";
    5252            xslt_string_param param3 "value3";
    5353        }
    5454        location /x3 {
    5555            xslt_stylesheet %%TESTDIR%%/test.xslt
    56                             param1='value1':param2=root;
     56                            param1='value1':param2=/root;
    5757            xslt_string_param param3 "value3";
    5858        }
Note: See TracChangeset for help on using the changeset viewer.