D
Davide Benini
I cannot get accented charecters in my HTML output...
I have tried to leave the accented characters in and to use iso-8859-1,
but there it doesn't work either.
I have tried to use à entity, but & is a reserved character.
I have tried to use à or ß but the entity is not
recognised, and I get as an output in the browser "à" or "ß"...
Maybe there is sometheing missing in the header...
This is a sample of my xml text
(the documents is a .php, for the purpuse of getting a variable from a
post...)
----------------
<?
header("Content-type: text/xml");
print '<?xml version="1.0" encoding="UTF-8"?>';
print '<?xml-stylesheet type="text/xsl" href="inf-dev.xslt"?>';
?>
<inferno>
<filtro><?=$_POST[filter]?></filtro>
<canto>
<n>1</n>
<passo>
<vv>1</vv>
<dante>
<v>Nel mezzo del cammin di nostra vita</v>
</dante>
<carson>
<v>Halfway through the story of my life</v>
</carson>
<nota>
<n>Carson introduces story</n>
</nota>
</passo>
<passo>
<vv>14</vv>
<dante>
<v>là dove terminava quella valle é</v>
</dante>
<carson>
<v>hill; here, the valley formed a cul-de-sac</v>
</carson>
<nota>Carson introduces cul-de-sac, often associated to the
alleys of Belfast; local
colour</nota>
</passo>
</canto>
</inferno>
-----------------------
This is the XSL:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xslutput method="html"/>
<xsl:template match="/">
<html>
<xsl:variable name="filter"><xsl:value-of
select="inferno/filtro"/></xsl:variable>
<head>
<title>Inferno: comparazione</title>
<link rel="stylesheet" title="main" href="stile-inf.css"
type="text/css" />
</head>
<body>
<div id="container">
<h1>Inferno</h1>
<h3>Filtro: <xsl:value-of select="inferno/filtro"/></h3>
<xsl:for-each select="inferno/canto">
<div class="cant">
<h2>
Canto <xsl:value-of select="n"/>
</h2>
<xsl:for-each select="passo">
<xsl:if test="contains(nota,$filter)">
<div class="pass">
<table border="0" width="100%">
<tr>
<td colspan="2">
<div class="vv">
<xsl:value-of select="../n"/>,
<xsl:value-of select="vv"/>
</div>
</td>
</tr>
<tr>
<td width = "50%">
<div class="dant">
<xsl:for-each select="dante/v">
<xsl:value-of select="."/>
<br/>
</xsl:for-each>
</div>
</td>
<td>
<div class="cars">
<xsl:for-each select="carson/v">
<xsl:value-of select="."/>
<br/>
</xsl:for-each>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="note">
<xsl:for-each select="nota">
- <xsl:value-of select="."/>
<br/>
</xsl:for-each>
</div>
</td>
</tr>
</table>
</div>
<br/>
</xsl:if> <!--CHIUSURA TEST-->
</xsl:for-each>
</div>
</xsl:for-each>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
any suggestion?
Thanks,
Davide
I have tried to leave the accented characters in and to use iso-8859-1,
but there it doesn't work either.
I have tried to use à entity, but & is a reserved character.
I have tried to use &agrave; or &#223; but the entity is not
recognised, and I get as an output in the browser "à" or "ß"...
Maybe there is sometheing missing in the header...
This is a sample of my xml text
(the documents is a .php, for the purpuse of getting a variable from a
post...)
----------------
<?
header("Content-type: text/xml");
print '<?xml version="1.0" encoding="UTF-8"?>';
print '<?xml-stylesheet type="text/xsl" href="inf-dev.xslt"?>';
?>
<inferno>
<filtro><?=$_POST[filter]?></filtro>
<canto>
<n>1</n>
<passo>
<vv>1</vv>
<dante>
<v>Nel mezzo del cammin di nostra vita</v>
</dante>
<carson>
<v>Halfway through the story of my life</v>
</carson>
<nota>
<n>Carson introduces story</n>
</nota>
</passo>
<passo>
<vv>14</vv>
<dante>
<v>là dove terminava quella valle é</v>
</dante>
<carson>
<v>hill; here, the valley formed a cul-de-sac</v>
</carson>
<nota>Carson introduces cul-de-sac, often associated to the
alleys of Belfast; local
colour</nota>
</passo>
</canto>
</inferno>
-----------------------
This is the XSL:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xslutput method="html"/>
<xsl:template match="/">
<html>
<xsl:variable name="filter"><xsl:value-of
select="inferno/filtro"/></xsl:variable>
<head>
<title>Inferno: comparazione</title>
<link rel="stylesheet" title="main" href="stile-inf.css"
type="text/css" />
</head>
<body>
<div id="container">
<h1>Inferno</h1>
<h3>Filtro: <xsl:value-of select="inferno/filtro"/></h3>
<xsl:for-each select="inferno/canto">
<div class="cant">
<h2>
Canto <xsl:value-of select="n"/>
</h2>
<xsl:for-each select="passo">
<xsl:if test="contains(nota,$filter)">
<div class="pass">
<table border="0" width="100%">
<tr>
<td colspan="2">
<div class="vv">
<xsl:value-of select="../n"/>,
<xsl:value-of select="vv"/>
</div>
</td>
</tr>
<tr>
<td width = "50%">
<div class="dant">
<xsl:for-each select="dante/v">
<xsl:value-of select="."/>
<br/>
</xsl:for-each>
</div>
</td>
<td>
<div class="cars">
<xsl:for-each select="carson/v">
<xsl:value-of select="."/>
<br/>
</xsl:for-each>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="note">
<xsl:for-each select="nota">
- <xsl:value-of select="."/>
<br/>
</xsl:for-each>
</div>
</td>
</tr>
</table>
</div>
<br/>
</xsl:if> <!--CHIUSURA TEST-->
</xsl:for-each>
</div>
</xsl:for-each>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
any suggestion?
Thanks,
Davide