Subject: Re: [xsl] How to detect if the context item exists From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 01 Jul 2011 00:03:52 +0100 |
No, within a named template it's not statically decidable. The named template might be called from within a function.
<xsl:template name=x"> <xsl:param name="hascontext" select="true()"/> ..
<xsl:call-template name="x"> <xsl:with-param name="hascontext" select="false()"/>
Trouble is even if you have the boolean with the right value at runtime its not easy to guard the relevant xpaths that would generate an error.
<xsl:template name=x"> <xsl:param name="context" select="()"/> <xsl:value-of select="$context/a/b/c"/>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XPath for parent nodes, b, Michael Kay | Thread | Re: [xsl] How to detect if the cont, Michael Kay |
[xsl] XPath for parent nodes, but e, Joel Dubien | Date | Re: [xsl] XPath for parent nodes, b, Syd Bauman |
Month |