|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] & not processed correctly by xsltproc
Hi folks,
It looks as though xsltproc generates the wrong data when set to output
HTML. It seems to translate "&" into "%26amp;" when inserting it
into an attribute value.
Version info:
------------------------------------------------------------------
15:16:17 [zbrown] ~/work/KT/source/xslt/tmp$ xsltproc --version
Using libxml 20420, libxslt 10016 and libexslt 707
xsltproc was compiled against libxml 20419, libxslt 10016 and libexslt 707
libxslt 10016 was compiled against libxml 20419
libexslt 707 was compiled against libxml 20419
------------------------------------------------------------------
Sample input:
------------------------------------------------------------------
<?xml version="1.0" ?>
<kc><section archive="&">&</section></kc>
------------------------------------------------------------------
Sample xslt file:
------------------------------------------------------------------
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" encoding="iso-8859-1"/>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="section">
<a href="{@archive}"><xsl:value-of select="@archive"/></a>
</xsl:template>
</xsl:stylesheet>
------------------------------------------------------------------
Sample run:
------------------------------------------------------------------
15:07:55 [zbrown] ~/work/KT/source/xslt/tmp$ xsltproc names.xsl 1.xml
<a href="%26amp;">&</a>
15:07:57 [zbrown] ~/work/KT/source/xslt/tmp$
------------------------------------------------------------------
I'd appreciate any help understanding why this is happening and what I
can do about it.
Many thanks,
Zack
--
Zack Brown
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








