[xml] Special characters in xslt (html) output
- From: "Kaarle Kaila" <kaarle kaila iki fi>
- To: <xml gnome org>
- Subject: [xml] Special characters in xslt (html) output
- Date: Sat, 28 Feb 2004 22:56:09 +0200
I have a problem. I use libxml2 and libxslt from my MSVC application. I have
managed to find out about most of my needs but I have a problem with special
characters such as å (aring), ä (auml) and ö (ouml). I provide my XSLT
stylesheet parameters with the filename I want to use in UTF-8 format.
I give the stylesheet parameters dir=yrjö3 first=""
It works OK if I donät have teh character ö in the dir.
My stylesheet is:
-----------------------------
<xsl:stylesheet version = '1.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
<xsl:template match="raport">
<xsl:variable name="lname" select="$dir"/>
<xsl:variable name="lfirst" select="$first" />
<xsl:output method="html" encoding="ISO-8859-1"/>
<html>
<head>
<title>Sukux</title>
</head>
<frameset rows="15%,*" cols="25%,*">
<frame name="logo" src="{$lname}/home.html" />
<frame name="hdr" src="{$lname}/hdr.html" />
<frame name="idx" src="{$lname}/idx.html" marginwidth="10"
marginheight="10" scrolling="auto" frameborder="0"/>
<frame name="data" src="{$lname}/data{$first}.html" marginwidth="10"
marginheight="10" scrolling="auto" frameborder="0"/>
</frameset>
</html>
</xsl:template>
</xsl:stylesheet>
------------------------------------
and the resulting html file is:
----------------------------------
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Sukux</title>
</head>
<frameset rows="15%,*" cols="25%,*">
<frame name="logo" src="yrj%C3%B63_files/home.html">
<frame name="hdr" src="yrj%C3%B63_files/hdr.html">
<frame name="idx" src="yrj%C3%B63_files/idx.html" marginwidth="10"
marginheight="10" scrolling="auto" frameborder="0">
<frame name="data" src="yrj%C3%B63_files/data.html" marginwidth="10"
marginheight="10" scrolling="auto" frameborder="0">
</frameset>
</html>
----------------------------------------------
Why is ö converted to %C3%B6 ? How can I make it the ö-character?
regards
Kaarle
--
Kaarle Kaila
email: kaarle dot kaila at iki dot fi
www.iki.fi/kaila
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]