Re: How to Parse String with Escaped XML Markup?
| Newsgroups | gmane.text.xml.xsl.general.mulberrytech |
|---|---|
| Message-ID | <[email protected]> |
Yes, I'm using the Saxon extension function to get the value of the @content pseudo-attribute.
What I didn't realize was that parse-xml and parse-xml-fragment() will handle the string as it comes, so this works:
<xsl:variable name="rawMarkup" select="saxon:get-pseudo-attribute('content')/>
<xsl:variable name="deletedContent" as="element()">
<deletedContent xmlns="">
<xsl:sequence select="parse-xml-fragment($rawMarkup)/>
</deletedContent>
</xsl:variable>
So it's all good.
Cheers,
E.
--
Eliot Kimber
http://contrext.com
On 1/15/21, 9:22 AM, "Martin Honnen [email protected]" <[email protected]> wrote:
Am 15.01.2021 um 15:58 schrieb Eliot Kimber [email protected]:
> I researched this question in this list but I didn't find a recent response so I'm asking it again.
>
> My specific requirement is to take the value of an Oxygen deleted content processing instruction and parse it back into elements in the context of an XSLT 3 transform.
>
> The PI is:
>
> <?oxy_delete author="ekimber" timestamp="20210115T085216-0600" content="<body><p><ul id="ul_c5k_mhh_34b"><li>li one</li><li>li two</li></ul></p></body>"?>
>
> 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 think Saxon PE and EE have an extension function to access the pseudo
attributes of a processing instruction value.
So inside of oXygen with Saxon PE or EE this should be easz.
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/3329386
or by email: [email protected]
--~--