xsl-list
[Top] [All Lists]

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

2011-01-07 14:38:33
On Thu, Dec 23, 2010 at 8:37 AM, David Lee <dlee(_at_)calldei(_dot_)com> 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?

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>