xsl-list
[Top] [All Lists]

Re: [xsl] Is there any xslt 2.0 processor that implements sticky d-o-e

2013-02-18 03:31:51
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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--