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

Re: escape quotation marks in replace function

Subject: Re: escape quotation marks in replace function
From: "Michael Kay michaelkay90@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 3 Oct 2024 19:45:40 -0000
Re:  escape quotation marks in replace function
Its `&quot;` not `&#quot;`.

Is that the first time Martin Honnen has made a mistake?

Michael Kay

> On 3 Oct 2024, at 20:38, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Thank you very much for the quick reply!
>
> [&#34;&#34;] works in my case. [&#quot;&#quot;] and [""] do not.
>
>
> On 10/3/24 16:31, Martin Honnen martin.honnen@xxxxxx
<mailto:martin.honnen@xxxxxx> wrote:
>>
>> On 03/10/2024 21:21, Martin Honnen martin.honnen@xxxxxx
<mailto:martin.honnen@xxxxxx> wrote:
>>> See https://www.w3.org/TR/xpath-31/#prod-xpath31-EscapeQuot, you should be
able to use two double quote characters "".
>>>
>>
>> but as you are inside of XML double quote attribute value delimiters you
can't use literal double quote but need two entity or two character references
e.g.
>>
>> \xA0 &#quot;&#quot;
>>
>> or
>>
>> \xA0 &#34;&#34;
>>
>>>
>>> On 03/10/2024 21:15, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx
<mailto:wolfhart.totschnig@xxxxxxxxxxx> wrote:
>>>> 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
<mailto: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 <>)
>>>>
>>>> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
>>>> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/582271> (by
email <>)
>>> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
>>> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/582271> (by
email <>)
>> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
>> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/2652055> (by
email <>)
>
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/3500899> (by
email <>)

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.