This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Wrong output encoding using XT
- From: Thomas Brand <brand at puzzle dot ch>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 12 Jun 2002 13:26:18 +0200
- Subject: [xsl] Wrong output encoding using XT
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi,
I'm using XT Version 20020426a
(http://www.blnz.com/xt/xt-20020426a-src/index.html).
My xt.xsl looks like this:
--------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:date="http://www.jclark.com/xt/java/java.util.Date"
version="1.0"
exclude-result-prefixes="date"
>
<xsl:output method="xml" encoding="ISO-8859-1" indent="yes"/>
<xsl:template match='/'>
<xsl:if test="function-available('date:to-string') and
function-available('date:new')">
<output><xsl:value-of select="date:to-string(date:new())"/></output>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
--------------
I make the transformation like this:
java com.jclark.xsl.sax.Driver xt.xsl xt.xsl
(the first arg is usually the source input file, but as we don't read data
from the source, it's not relevant what the arg is)
the output looks like this:
--------------
<?xml version="1.0" encoding="utf-8"?>
<output>Wed Jun 12 13:18:58 CEST 2002</output>
--------------
why is the encoding "utf-8"? In xsl.xt, it is defined to use ISO-8859-1.
does XT support other charsets than utf-8?
greets
Thomas Brand
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list