[Home] [By Thread] [By Date] [Recent Entries]
HI
I just synced debian's libxslt 1.1.18 and it appears to have buggy copy-of function. I've attached small test1.sh script that should do the transformation and verify it's output with attached correct result verify-output.xml Basically making <a><value-of .../><(a> should be identical to the <copy-of select="."/> but it isn't and it seems escape & is treated differently in value-of and copy-of case!!!! It works correct on 1.1.17 but on 1.1.18 it sends an error error : unterminated entity reference var=5 and of course output is different (truncated part after &) < <a href="index.php?table=2&var=5">item 5</a><a href="index.php?table=2&var=5">item 5</a> --- <a href="index.php?table=2&var=5">item 5</a><a href="index.php?table=2">item 5</a>
layout1.xsl
--------------
<?xml version="1.0" encoding="iso-8859-2"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" encoding="utf-8"/>
<xsl:template match="/">
<html>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template> <xsl:template match="formular">
<form action="{@url}">
<xsl:apply-templates select="a"/>
</form>
</xsl:template> <xsl:template match="a">
<a href="{@href}"><xsl:value-of select="."/></a>
<xsl:copy-of select="."/>
</xsl:template></xsl:stylesheet> verify-output1.xml ------------------------ <html><body><form action="http://server/application?table=1&var=3"> <a href="index.php?table=2&var=5">item 5</a><a href="index.php?table=2&var=5">item 5</a> </form></body></html> test1.sh ---------- #!/bin/sh xsltproc layout1.xsl source1.xml > output1.xml diff verify-output1.xml output1.xml
|

Cart



