OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] problem with #&233; characters and such in URL

[ Lists Home | Date Index | Thread Index ]

Thanks for the tips.

the &#xxx; chars are here to stay it seems, without an easy way to convert them into browser readble %xx (eg. "é" -> "%E9")

I have tried your suggestions already. ISO vs. UTF or output method doesn't change the output in any way, unfortunately. :(

The data gets read out of a DB where the names are stored binary (I think)

here a part of the script:


<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0"

<xsl:output method="html"/>

<xsl:param name="pageheight">200</xsl:param>
<xsl:param name="pagewidth">400</xsl:param>

<!-- this template replaces the newlines in the text parameter with <br/>
     and outputs the parameter -->
<xsl:template name="break">
 <xsl:param name="text" select="."/>
   <xsl:when test="contains($text, '&#13;&#10;')">
     <xsl:value-of disable-output-escaping="yes" select="substring-before($text, '&#13;&#10;')"/>
     <xsl:call-template name="break">
       <xsl:with-param name="text" select="substring-after($text,'&#13;&#10;')"/>
           <xsl:value-of disable-output-escaping="yes" select="$text"/>
  <th align="left"><xsl:value-of select="/movieinfo/moviemetadata/field[@name='Actor']/@label"/></th>
<xsl:for-each select="cast/star">
                       <td nowrap="nowrap" class="value"><a href="http://us.imdb.com/Name?{person/lastname},+{person/firstname}"><xsl:apply-templates select="person"/></a></td>
                       <xsl:if test="character!=''">
                         <td class="value"><i><xsl:value-of select="character"/></i></td>


would it be possible to just use "substring-after" used in teh "break" template for all occurances of accented (&#xxx;) characters?


>From: "Thomas B. Passin" <TPASSIN@COMCAST.NET>
>To: Rick Jelliffe <RICKO@ALLETTE.COM.AU>, xml-dev@lists.xml.org
>Subject: Re: [xml-dev] problem with #&233; characters and such in URL
>Date: Mon, 20 Jan 2003 21:59:20 -0500
>[Rick Jelliffe]
>The problem is probably that your XSLT stylesheet is writing out UTF-8 while
>browser is reading in those bytes as ISO8859-1.
>If your web application only has to cope with ISO8859-1, then the simplest
>is to specify that your XSLT processor generates 8859-1 rather than UTF-8,
>xslt:output IIRC.
>If you want to cope with more characters using UTF-8, look at the following
> * make sure that the HTML code you generate has a meta tag which labels
>charset (the encoding) you are using (HTML defaults to 8859-1)
>[Tom P]
>And if you are importing javascript, state the character encoding that the
>script will be in the

Fotos  -  MSN Fotos das virtuelle Fotoalbum. Allen Freunden zeigen oder einfach ausdrucken: Hier klicken


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS