[xslt] What encoding attribute values use (1.0.15 vs. 1.0.18 behavior)



Hello,
  I'm using <xsl:attribute> in one of my projects, and now I found that
xslt behavior between 1.0.15 and 1.0.18 changed: in 1.0.15, it generated
html output <a href="Č"> (Č in iso-8859-2), while 1.0.18 (and current cvs)
generates <a href="%C4%8C"> - Č in UTF8 encoding.

  Is this change intentional, and I have to convert attribute values to
iso-8859-2 after XSLT pass (yes, I really need iso-8859-2 in attribute
values - for example default values for INPUT boxes), or is this
unintentional change?

  I tried to fill this as a bugreport to bugzilla.gnome.org, but it
does nothing after login dialog :-( So please CC me in replies.
                                                Thanks,
                                                        Petr Vandrovec
                                                        vandrove@vc.cvut.cz


# xsltproc -V   (Debian unstable)
Using libxml 20423, libxslt 10018 and libexslt 709
xsltproc was compiled against libxml 20422, libxslt 10018 and libexslt 709
libxslt 10018 was compiled against libxml 20422
libexslt 709 was compiled against libxml 20422

# charconv.xml
<?xml version="1.0" encoding="iso-8859-2"?>
<test>Č</test><!-- it is %C8 -->

# charconv.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" version="4.0" encoding="iso-8859-2" media-type="text/html"/>
<xsl:template match="test">
<xsl:element name="a">
<xsl:attribute name="href">url?<xsl:value-of select="text()"/></xsl:attribute>
</xsl:element>
</xsl:template>
</xsl:stylesheet>

# Generated charconv.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<a href="url?%C4%8C"></a>



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