Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

French accent characters and xsl:attribute

607 views
Skip to first unread message

Frederic Claux

unread,
Jan 18, 2002, 6:14:14 AM1/18/02
to
I have a little question...

Here is my XML file (not very interesting since the XSLT generates
everything) :

<?xml version="1.0" encoding="windows-1252" ?>
<?xml-stylesheet type="text/xsl" href="test.xsl" ?>
<dummy>
</dummy>

Here is a my XSLT file :

<?xml version="1.0" encoding="windows-1252" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<html>
<head>
<title>This is a test</title>
</head>
<body>
<a>
<xsl:attribute name="href">
javascript: alert('The E acute character in French is : é')
</xsl:attribute>
Check this out
</a>
</body>
</html>
</xsl:stylesheet>

Here comes my HTML output :

<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=UTF-16">
<title>This is a test</title>
</head>
<body>

<a href="javascript: alert('The E acute character in French is : %C3%A9')">
Check this out
</a>

</body>
</html>

That's not what I want...
How can I force the output to be :

<a href="javascript: alert('The E acute character in French is : é')">
Check this out
</a>

I don't want to play with escape sequences inside my XSLT and I would like
my é character to be typed as-is. In other words, I'd like - if possible -
to keep the XSLT very readable.

Any idea ?

--
Frederic Claux

PS: I hope you can all see the three 'E acute' characters present in this
message.


Etienne Fortin

unread,
Jan 18, 2002, 10:15:50 AM1/18/02
to
Dealing with accents, I had some luck using the ISO-8859-1 character set
instead of the windows-1252 character set.

Etienne Fortin

"Frederic Claux" <nospam_f.claux@nospam_techbase.fr> wrote in message
news:#DbqxEBoBHA.1928@tkmsftngp07...

Marrow

unread,
Jan 19, 2002, 6:03:06 AM1/19/02
to
Frederic,

Use...
<xsl:output method="html" encoding="windows-1252"/>

in your XSL

Hope this helps
Marrow
http://www.marrowsoft.com - home of Xselerator (XSLT IDE and debugger)
http://www.topxml.com/Xselerator

Frederic Claux wrote in message <#DbqxEBoBHA.1928@tkmsftngp07>...

0 new messages