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

Is it possible to use replace with an variable for en

Subject: Is it possible to use replace with an variable for entities?
From: "Torsten Schaßan schassan@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 7 Jul 2022 05:35:59 -0000
 Is it possible to use replace with an variable for  en
o;?Dear colleagues,

I need to replace Unicode references (encoded in RTF) with entities via XSLT.

My replace command would look like these for example:

replace($value, '\\u7936', 'a<')
replace($value, '\\u183 \\\^b7', 'B7')

Now I want to avoid to have x-times (nested?) replaces for each character, but
would like to use a variable like this:

replace($value, '\\u(\d{4})', '&#$1;')
replace($value, '\\u(\d{3}) \\\^[0-9a-z]{2}', '&#$1;')

This, unfortunately, throws an error, as '&#$1;' is no valid entity
declaration.

Additionally, my parser doesn't allow to use map:keys($rtfEncodingMap).

Is there a workaround or a solution I might have missed?



Best,
Torsten
--
Torsten Schassan - Abteilung Handschriften und Sondersammlungen / Digitale
Editionen
Herzog August Bibliothek, D-38299 Wolfenbuettel, Tel.: +49 5331 808-130 Fax
-165
Handschriftendatenbank: https://diglib.hab.de/?db=mss

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.