This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
It would be really useful if patterns could have access to template parameters. The parameter would still have to be declared by the template for it to be visible (as with tunnel parameters). Also, when visible, it would shadow any global variables with the same name (just as with local variables/parameters). For example: <xsl:template match="*[. is $node]"> <xsl:param name="node" tunnel="yes"/> <found/> </xsl:template> <xsl:template match="*"> <not-found/> </xsl:template> Right now I have to use <xsl:choose> (yuck). I can't think of any issues with this other than the somewhat unintuitive aspect of the parameter being declared just below where it's being referenced (as opposed to above).
I'm a little sceptical about the value of this (but open to persuasion). One obvious complication is the effect on xsl:next-match and xsl:apply-imports.
The WG looked at this with interest. But there was a general feeling that it would be too confusing.