Subject: Re: Is there any xslt 2.0 processor that implements sticky d-o-e
From: Liam R E Quin <liam@xxxxxx>
Date: Mon, 18 Feb 2013 04:31:37 -0500
|
On Mon, 2013-02-18 at 09:58 +0100, bryan rasmussen wrote:
> No, that's exactly what I wanted. A way in xslt 2.0 to take a node
> that has escaped xml - as in your example
> <title>hello</title> unescape itr and access it as a
> document node
We can come close - we can take a string, which could be extracted from
a node, and we can turn that into an element tree, with saxon:parse() -
to use this you have to associate the prefix saxon with
"http://saxon.sf.net/" e.g.
<xsl:stylesheet .. .. ..
xmlns:saxon="http://saxon.sf.net/">
[. . .]
<xsl:variable name="theTree" select="saxon:parse($theString)" />
<xsl:value-of select="$theTree//title" />
You'll probably have to use try/catch if the unescaped string might not
be well-formed XML of course.
Liam
--
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml
|