When I use only <xsl:apply-templates/> the template for child is invoked/applied. But if I use select with path(as in code below) the template is not invoked.
Kindly help.
The XML file is
Code:
<?xml version="1.0" encoding="utf-8" ?>
<OrderPrice>
<Orderstack title="OS 1" code="OS 1" expanded="true">
<Order title="ord1"/>
<Order title="ord2"/>
</Orderstack>
</OrderPrice>
Code:
<xsl:template match="/OrderPrice">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<xsl:apply-templates select="Order">
<xsl:with-param name="depth" select="1"/>
</xsl:apply-templates>
</td>
</tr>
</table>
</xsl:template>
<xsl:template match ="Orderstack">
<xsl:param name="depth"/>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<!-- If first level of depth, do not shift of $param-shift-width-->
<xsl:if test="$depth>1">
<td width="{$param-shift-width}"/>
</xsl:if>
<td>
<xsl:if test="@expanded">
<xsl:if test="@expanded='true'">
Minus
</xsl:if>
<!-- plus (+) otherwise-->
<xsl:if test="@expanded='false'">
Plus
</xsl:if>
</xsl:if>
<xsl:if test="not(@expanded)">
<xsl:if test="$param-deploy-treeview = 'true'">
Minus
</xsl:if>
<xsl:if test="$param-deploy-treeview = 'false' or not(@expanded)">
Plus
</xsl:if>
</xsl:if>
<xsl:value-of select ="@title"/>
<xsl:apply-templates select="OrderStack">
<xsl:with-param name="depth" select="$depth+1"/>
</xsl:apply-templates>
<xsl:apply-templates select="Order"/>
</td>
</tr>
</table>
</xsl:template>