Re: [xsl] processing of xml embedded in string

Subject: Re: [xsl] processing of xml embedded in string
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Mon, 31 Mar 2008 14:52:35 +0200
Christian Wittern wrote:

What I want to do is something like:

 <xsl:template match="str[@name='textfield']">
     <xsl:variable name="s">
     <xsl:value-of select="." disable-output-escaping="yes"/>
     </xsl:variable>
     <xsl:apply-templates select="$s"/>

</xsl:template>

and then have another template that matches the content:


<xsl:template match="tei:p">

Is that XSLT 1.0 or 2.0? With XSLT 1.0 the value of variable s is a result tree fragment and you would first need to use an extension function (usually exsl:node-set($s)) to convert that to a node-set, then you can use e.g.
<xsl:apply-templates select="exsl:node-set($s)/*"/>


--

	Martin Honnen
	http://JavaScript.FAQTs.com/

Current Thread