XSLT: Using a different way of processing within the current way of processing.
Posted
by krisvandenbergh
on Stack Overflow
See other posts from Stack Overflow
or by krisvandenbergh
Published on 2010-05-03T15:13:20Z
Indexed on
2010/05/03
15:18 UTC
Read the original article
Hit count: 228
Below I'm trying to match certain nodes.
<xsl:template match="nodes">
<element>
<xsl:apply-templates select="nodes" mode="different" />
</element>
</xsl:template>
Now, there are multiple ways of processing for the same nodes. I want to use this different way of processing within the current way of processing. That's why I perform apply-templates
on the same selection, which is nodes
, however the mode
is different now.
Here's how the different mode could look like:
<xsl:template match="nodes" mode="different">
<!-- another way of processing these nodes -->
</xsl:template>
Now, this does not work. Only the first type of processing is processed and the apply-templates
call is simply not applied.
What am I doing wrong, how can I get what I want using XSLT? What could be another approach to solve this problem?
© Stack Overflow or respective owner