[xsl] Escaped markup 2 temporary tree

Subject: [xsl] Escaped markup 2 temporary tree
From: "Jesper Tverskov" <jesper@xxxxxxxxxxx>
Date: Wed, 12 Sep 2007 00:39:58 +0200
Hi list

Is it possible to convert a variable with escaped markup to a temporary tree?

I would like to load an XML document as unparsed-text, do some
cleaning with regular expressions, convert it back to XML and then
transform it, in one go.

The following is only giving me no longer escaped markup, but not a
temporary tree:

<xsl:variable name="a" select="'&lt;p/>'"/>

<xsl:variable name="b">
<xsl:value-of select="$a" disable-output-escaping="yes"/>
</xsl:variable>

<xsl:sequence select="$b"/>

Instead I am using a work around saving "b" with result-document and
load it again with the collection() function (nice that we are allowed
to do that in Saxon). It solves my problem.

But I would like to know if conversion from escaped markup to a
temporary tree is possible? If it is not possible, then why not?

Cheers
Jesper Tverskov
www.xmlplease.com

Current Thread