xsl-list
[Top] [All Lists]

Re: encoding problem

2004-04-20 06:03:57
Hi, sorry for the late response....and thank you very much for your answer. As Michael said "it's unsafe to use non ASCII characters in the names of HTML-Anchors" i'd now like to replace all 'ß' in my file with '&#224' also also all ä.ö, and so on... (as Pieter proposed)

I'd also like to use another xslt-stylesheet for this task. Now my questions:
a) is it possible?
b) am not allowed to change the original xml-file, but don't want to implement all the stuff inside of the xslt doing it 'on the fly'. --> Is there a way to include an xslt-stylsheet inside my actual styleshett, which:
- replaces the characters
- creates some sort of temporary-xml-file without all these umlaute?

Is this a possible solution, is there a better way to do it?

Second question: How do i do that? translate() just replaces one character with another. i now just tried the following, which doesn't seems to be a 'nice' solution:
<xsl:value-of selected="substring-before($combomodell, 'ß')"/>
<xsl:text>&#224</xsl:text>
<xsl:value-of select="substring-after($combomodell, 'ß')"/>

Help is very much appreciated.

Thanx in advance,
daniel


Am 12.04.2004 um 23:36 schrieb Pieter Reint Siegers Kort:

Hi Daniel,

If you define your output to be HTML, like this:

<xsl:output method="html" indent="yes"/>

the processor should know to process html, and might well be able to let the
'ß' through, as is.

If you already have the output defined as html, then you could simply check if the node text contains the 'ß' and replace this by '&#224;'; this will
output '&szlig;' which will show up as a 'ß' in the browser.

Let me know if any of this helps you in the right direction.

Cheers, Pieter

<prs/>
http://www.pietsieg.com
http://www.pietsieg.com/dotnetnuke
Contributor on www.ASPToday.com
Co-author on "Professional ASP.NET XML with C#", July 2002 by Wrox Press



--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--




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