Subject: Re: [xsl] Use of xsl:apply-templates exception with an element From: ac <ac@xxxxxxxxxxxxx> Date: Fri, 25 Sep 2009 16:45:20 -0400 |
Thanks, ac
I understand local-name and namespace uris, but isn't strange that you can use <xsl:copy-of select="*[@self::attribution]"/> but not <variable name="name" select=" 'attribution' "/> ...
<xsl:copy-of select="*[@self::{$name}]"/> for example.
Or similarily, <xsl:copy-of select="*[@self::{@name}]"/>
It's only strange if you've somehow got it into your head that XSLT/XPath is a macro language in which variables are inserted into expressions by textual substitution before the expression is parsed and executed. Since that's a completely erroneous view of the processing model, it's not surprising that it leads you to false expectations.
Regards,
Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Use of xsl:apply-template, Michael Kay | Thread | Re: [xsl] Use of xsl:apply-template, David Carlisle |
Re: [xsl] Use of xsl:apply-template, ac | Date | Re: [xsl] Use of xsl:apply-template, David Carlisle |
Month |