Subject: Re: [xsl] escape quotation marks in replace function From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 3 Oct 2024 19:30:31 -0000 |
On 03/10/2024 21:21, Martin Honnen 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. B &#quot;&#quot; or B "" > On 03/10/2024 21:15, Wolfhart Totschnig 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 >> 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(.,"([ C"BB])'","$1C"BB")"/> >>> >>> 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 ["] 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 <>)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] escape quotation marks in, Martin Honnen martin | Thread | Re: [xsl] escape quotation marks in, Wolfhart Totschnig w |
Re: [xsl] escape quotation marks in, Martin Honnen martin | Date | Re: [xsl] escape quotation marks in, Wolfhart Totschnig w |
Month |