[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Dynamic dispatch of functions/templates (was matching text() )


Subject: Re: [xsl] Dynamic dispatch of functions/templates (was matching text() )
From: iwanttokeepanon <iwanttokeepanon@xxxxxxxxx>
Date: Fri, 7 Jan 2011 14:38:17 -0600

On Thu, Dec 23, 2010 at 8:37 AM, David Lee <dlee@xxxxxxxxxxx> wrote:
> Still thinking how to change
>             <xsl:apply-templates select="text()"/>
>             
> <xsl:template match="some_xpath/text()" >
> ..

Can I ask a question (it may be stupid), if that is the only thing you
are trying to do then isn't that easy?  E.g.:

XML: <root>
<a>first-text <b>second-text</b> </a>
</root>

XSL: <xsl:template match="text()[parent::b[parent::a[parent::root]]]">
   text=<xsl:value-of select="." />
</xsl:template>

Ok, there is probably a more elegant way to express that but it works,
right?  Or did I miss something in the talk about multiple text nodes?


Current Thread