Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: XSL HELP!! >Thread Next - Re: XSL HELP!! Re: XSL HELP!!To: NULL Date: 5/28/2008 4:08:00 PM Ganesh Muthuvelu wrote: > Thanks for your help. I have one question on this. Is it possible to have a > variable name for the template "match"?. > The reason I am asking this is: The node "UnixEmail" is NOT static and may > change dynamically, for example, it could be even the "Domain" node.. > > So, is it possible to have something like this n XSL:? > > <xsl:template match=@DynamicNodeName> No, that is not possible. With XSLT 1.0 you are not even allowed to use variables in match pattersn. With XSLT 2.0 you could use <xsl:param name="element-name" select="'UnixEmail'"/> <xsl:template match="*[local-name() eq $element-name]"> There are currently three XSLT 2.0 processors, Saxon 9, AltovaXML, and Gestalt. With XSLT 1.0 you need to check inside of your template e.g. <xsl:template match="*"> <xsl:choose> <xsl:when test="local-name() = $element-name"> -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
