Re: [xsl] How to Parse String with Escaped XML Markup?

Subject: Re: [xsl] How to Parse String with Escaped XML Markup?
From: "Liam R. E. Quin liam@xxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 15 Jan 2021 20:25:18 -0000
On Fri, 2021-01-15 at 14:58 +0000, Eliot Kimber ekimber@xxxxxxxxxxxx
wrote:
> 
> <?oxy_delete author="ekimber" timestamp="20210115T085216-0600"
> content="&lt;body&gt;&lt;p&gt;&lt;ul
> id=&quot;ul_c5k_mhh_34b&quot;&gt;&lt;li&gt;li
> one&lt;/li&gt;&lt;li&gt;li
> two&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;/body&gt;"?>
> 
> What I'm failing to work out is how to convert the value of the
> @content pseudo-attribute back into a proper XML string that I can
> pass to parse-xml().

I'd start by making a sequence of (name,  value) pairs and only then
replace the entities, perhaps by treating each as an XML fragment
inside try/catch.

This is assuming you want to avoid extension functions, which i think
wise where possible.


-- 
Liam Quin,B https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations: B http://www.fromoldbooks.org

Current Thread