I've been stuck on this for a while...
I've got this XML:
Code:
<admin_panel>
...
<content>
// anything could be in here
</content>
</admin_panel>
Within the content tag could be any well formed XHTML with intermixed <action/> tags at arbitrary depths.
I want to copy the contents of the content node and then apply a template to all <action/> tags that are within.
I can't figure it out...Either I get a copy of the content node or I just get the templates applied to the <action/> tags. Here is my XSL:
Code:
<xsl:template match="content">
<div id="admpnl_content">
<xsl:copy-of select="." />
</div>
</xsl:template>
<xsl:template match="//action">
<a>
<xsl:attribute name="href">?app=<xsl:value-of select="//app_gui"/>&<xsl:value-of select="."/></xsl:attribute>
<xsl:value-of select="@name"/>
</a>
</xsl:template>
The above XSL only returns a copy-of the content node and does not apply the template to the action tags. Any help would be much appreciated.