[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] variable in xsl:template match


Subject: RE: [xsl] variable in xsl:template match
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 26 Apr 2007 17:35:35 +0100

> If you do care about namespaces, you can do:
> <xsl:param name="target" as="xs:QName" 
> select="xs:QName('ns:position') />
> 
> <xsl:template match="/root/*[local-name-from-QName($targer) =
> local-name() and namespace-uri-from-QName($target) = 
> namespace-uri()]/child" >....

That seems to be equivalent to

<xsl:template match="/root/*[node-name() = $target]/child" >....

Michael Kay
http://www.saxonica.com/


Current Thread