Re: [xsl] processing of xml embedded in string

Subject: Re: [xsl] processing of xml embedded in string
From: Christian Wittern <cwittern@xxxxxxxxx>
Date: Mon, 31 Mar 2008 22:11:13 +0900
Martin Honnen wrote:
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)/*"/>


In fact, this is XSLT 2.0 -- this is why I thought it should work:-)

Christian



--

Christian Wittern Institute for Research in Humanities, Kyoto University
47 Higashiogura-cho, Kitashirakawa, Sakyo-ku, Kyoto 606-8265, JAPAN


Current Thread