xsl-list
[Top] [All Lists]

RE: Escape caracters

2004-05-28 08:30:45
From: Passin, Tom [mailto:tpassin(_at_)mitretek(_dot_)org] 
 
From: SMITH Neil [mailto:neil(_dot_)smith(_at_)unifr(_dot_)ch] 

The problem is that these caracters appear in the browser to 
(ie and mozilla)... And this file is used to create a 
report... So I can't really leave them... Do you want to have 
a look at the XSL and XML documents? I maybe got something 
wrong in one of them...


Yes, why don't you show us samples of the actual source, xslt, and
resulting HTML which display the behavior?

But please, try to simplify them down to just the core bit that displays
the behavior!  Also, be sure to include the complete xsl:output element
and any meta elements in the output html that specify the character set.

Basically, it sounds like the browser you are viewing the file with is
set for a different encoding than the html file is created in, like
iso-8859-1 vs utf-8.  That could happen if the html file contains no
meta element specifying the encoding.  Sometimes this ends up with the
browser unable to show the correct characters.

Cheers,

Tom P

Ok, here goes...

This is the XSL

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:template match="/">

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"/>
<html>
<body>

<xsl:apply-templates select=".//RR_row"/>

</body>
</html> 
</xsl:template>

etc...


This is the generated HTML

<?xml version="1.0" encoding="UTF-8"?><META HTTP-EQUIV="Content-Type" 
CONTENT="text/html; charset=UTF-8"/>
<html><body><p><i><b>AEBI PHILIPP, Assoziierte(r) Professor(in)</b></i></p>

etc... And here is the caracter references...

<p style="margin-left:72.0pt">Allenbach, Brigit. Was heisst da Familie? 
Ethnologische Ansichten in der Theorie und aus der Praxis. Vortrag im Rahmen 
des Seminars &amp;#8222;Die Familie aus interdisziplinärer 
Sicht&amp;#8220;/&amp;#8220;La famille vue par différentes 
disciplines&amp;#8220;. Freiburg, Institut für Familienforschung und 
&amp;#8211;beratung, 20.06.02.</p>


Have a nice week-end!
Cheers
Neil.


<Prev in Thread] Current Thread [Next in Thread>