xsl-list
[Top] [All Lists]

RE: [xsl] variable in xsl:template match

2007-04-26 09:36:03
 

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/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--