xsl-list
[Top] [All Lists]

RE: [xsl] translate apos in string

2007-01-16 04:25:45
A good way to do this is to use variables:

<xsl:variable name="apos">'</xsl:variable>

<xsl:value-of select="translate(xxx, $apos, '')"/>

Michael Kay
http://www.saxonica.com/ 

-----Original Message-----
From: Jimmy [mailto:jimmy(_at_)outerlimits(_dot_)ch] 
Sent: 16 January 2007 11:13
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] translate apos in string

I'm trying to get rid of the ' and the line feeds in my 
string but can't get it to work.

That's what I have so far:

<xsl:value-of select="
translate(translate(/node,'&#xA;',''),'&apos;', '&apos;')"/>


The first translation of line feeds works just fine, but I 
can't get rid of the apostrophe. The parser gives me an error 
because of the &apos. I tried different stuff but couldn't 
get the proper solution.

Anyone got a hint there?

Thanks
Jimmy

--~------------------------------------------------------------------
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>
--~--



--~------------------------------------------------------------------
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>