[Home] [By Thread] [By Date] [Recent Entries]
Hi Aaron,
You'll need to add (and know) what the context node is. Suppose the following (expecting "navigation" to be your root node): >>>> Example of root node, root node is "above" the root node of your xml doc. <xsl:template match="/"> <xsl:if test="navigation/focusedTab[@name = 'Login']" > .... </xsl:if> </xsl:template> >>>> Example of named template. Here the context node is still the root node: <xsl:template match="/"> <xsl:call-template name="scripts" /> </xsl:template> <xsl:template name="scripts"> <xsl:if test="navigation/focusedTab[@name = 'Login']" > .... </xsl:if> </xsl:template> >>>> Example of normal template. Here the context node is "navigation":
<xsl:template match="/">
<xsl:apply-template select="navigation"/>
</xsl:template>
<xsl:template match="navigation">
<xsl:if test="focusedTab[@name = 'Login']" >
....
</xsl:if>
</xsl:template>In short: once you know "where you are" in the document parse tree, or in other words: are aware of the context node, you can find how your XPath expression should be like. Good luck! Cheers, Abel Braaksma http://abelleba.metacarpus.com Aaron Johnson wrote: Appologies if this is a repeated request...
|

Cart



