[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

& not processed correctly by xsltproc

Subject: & not processed correctly by xsltproc
From: Zack Brown <zbrown@xxxxxxxxxxxxxxx>
Date: Thu, 30 May 2002 15:17:40 -0700
xsltproc amp
Hi folks,

It looks as though xsltproc generates the wrong data when set to output
HTML. It seems to translate "&amp;" 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="&amp;">&amp;</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;">&amp;</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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.