[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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

Subject: Re: Using translate() for single quotes in XSL1.0
From: "Georg Hohmann" <georg.hohmann@xxxxxxxxx>
Date: Tue, 29 Aug 2006 16:04:59 +0200
single quote
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@xxxxxxxxxxxx>:
As I said, look in the FAQ under replace:

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

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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.