You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by xa...@freenet.de on 2002/06/25 22:35:26 UTC

Problem with encoding

I have a very strange behavior of xalan:

Using the xml and xsl below i get the problem (only under solaris, not under windows!), that the first output of the special chars are correct, while inside the parameter "value" disable-output-escaping didn't work (inside xsl:attribute). Is it a bug or a feature?

1st the XML File:
<?xml version="1.0" encoding="ISO-8859-1"?>
<test>
  <name>���</name>
</test>

2. The XSL File:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html" indent="yes" encoding="ISO-8859-1"/>
  <xsl:template match="/test/name">
     Test:<xsl:value-of disable-output-escaping="yes" select="."/>
     <input><xsl:attribute name="value"><xsl:value-of disable-output-escaping="yes" select="."/></xsl:attribute></input>
  </xsl:template>
</xsl:stylesheet>

3. Output:
Test:���<input value="&ouml;&auml;&uuml;">



--
Nette Leute zum Flirten, Lachen und Verlieben,
fuer Reisen, Sport und Freizeit!
http://www.freenet.de/tipp/single