xsl-list
[Top] [All Lists]

Re: [xsl] Using translate() for single quotes in XSL1.0

2006-08-29 07:05:23
Hello,

i tried nearly the same as Oleg but couldn't find a solution. Maybe
i'm wrong but i think the solution to remove smart quotes in the faq
is wrong. I tried to replace all occurences of " (double-quote) with '
(single-quote) inside a text-string. Following the solution in the
faqs i thought this would work:

<xsl:value-of select="replace(.,'&#34;','&#39;')"/>

But it doesn't because the entity references seem to be resolved
before the stylesheet is processed. Running it with Saxon (XSLT2)
produces this error:

{replace(.,'"','''}:
Unmatched quote in expression

Now I'm stuck. Any ideas?

Georg.




2006/8/27, Michael Kay <mike(_at_)saxonica(_dot_)com>:
As I said, look in the FAQ under replace:

http://www.dpawson.co.uk/xsl/sect2/replace.html

Michael Kay
http://www.saxonica.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>
--~--