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 Miguel Angel Medina Lopez <ma...@logic-factory.com> on 2002/02/21 18:08:32 UTC

Euro Entity

Hi all:
I have a problem generating a Html document using XSLT and Xalan. I want to
show the Euro character in the document, but the character that appear is
'?'. However, is very strange because it occur sometimes, when I use the
xsl:text element. To clarify, here is an example of the behavior I describe.
Here is the code with the xsl:text elements. With this code the browser
show:  "Price 1000 ?". The code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html" encoding="ISO-8859-1"/>
<xsl:template match="ROOT">
<html>
<head>
<script language="JavaScript">
<xsl:text disable-output-escaping="yes"><![CDATA[
<!--  // JavaScript code -->
]]></xsl:text>
</script>
</head>
<body>
  <center>Price: 1000 &#8364;</center>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

Now, the code without the elements.

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html" encoding="ISO-8859-1"/>
<xsl:template match="ROOT">
<html>
<head>
</head>
<body>
  <center>Price: 1000 &#8364;</center>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

In this case, the Euro sign appear in the browser. With other entities, like
&ntilde;, either works fine.
Anybody can help me?

Thank You.

-------------------------------------------------------------
Miguel Ángel Medina López
Logic Factory: www.logic-factory.com
Granada - España