Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


accented characters

From: Davide Benini <nutsmuggler@-------.--->
To: NULL
Date: 6/1/2005 10:29:00 AM
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 &agrave; entity, but & is a reserved character.
I have tried to use &amp;agrave; or &amp;#223; but the entity is not 
recognised, and I get as an output in the browser "&agrave;" or "&#223"...
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">



<xsl:output 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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent