[xslt] context changing inside concat() function?



Hello.
Please, tell me, if such behavior of libxslt is right?
>cat test_libxslt.xml
<?xml version="1.0" encoding="KOI8-R" ?>
<root>
    <node name="a" value="aa"/>
</root>
>cat test_libxslt.xsl
<?xml version="1.0" encoding="koi8-r"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
<xsl:template match="root">
    <xsl:value-of select="concat(
        node[@name='a']/@value,
        ':',
        /root/node[@name='a']/@value,
        ':',
        node[@name='a']/@value,
        '&#10;')"/>
</xsl:template>
</xsl:stylesheet>
>$xsl2 -V test_libxslt.xsl test_libxslt.xml
Using libxml 20420, libxslt 10016 and libexslt 707
xsltproc was compiled against libxml 20420, libxslt 10016 and libexslt 707
libxslt 10016 was compiled against libxml 20420
libexslt 707 was compiled against libxml 20420
<?xml version="1.0"?>
aa:aa:
I think that context was changed inside concat() function.
msxml output is:
<?xml version="1.0" encoding="UTF-16"?>bb:aa:bb
Thank You in andvance, Alexey.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]