Re: [xsl] escape quotation marks in replace function

Subject: Re: [xsl] escape quotation marks in replace function
From: "Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 3 Oct 2024 19:14:40 -0000
On my end, it looks like the encoding of the smart quotation marks in 
the code got mixed up during the transmission of the email (namely, they 
seem to have been replaced by "\xE2"). I therefore attach a picture of what 
the code should look like in the email.


On 10/3/24 15:51, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote:
> Dear list,
>
> The following replace function replaces a /straight/ single quotation 
> mark (or apostrophe) with a /smart/ single quotation mark when it is 
> preceded by either a space or a /smart double/ quotation mark:
>
> <xsl:value-of select="replace(.,&#34;([ C"BB])'&#34;,&#34;$1C"BB&#34;)"/>
>
> I would like to add to this code such that it also replace the 
> straight single quotation mark when it is preceded by a /straight/ 
> double quotation mark. What do I have to add between the brackets to 
> achieve this? Putting either ["] or [&#34;] produces an error since 
> both of these are used in the surrounding code.
>
> Thank you in advance for your help!
> Wolfhart
>
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/2652055> 
> (by email <>)

[demime 1.01d removed an attachment of type image/png which had a name of Screenshot from 2024-10-03 16-07-18.png]

Current Thread