[Home] [By Thread] [By Date] [Recent Entries]
Hi Ken,
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}]"/>Isn't this inconsistent from the language?
I would prefer <xsl:copy-of select="*@[self::{$name1} or self::{$name2} or self::{$name3} or self::{$name4} or ...)]"/> to <xsl:copy-of select="*@[(local-name()=$name1 and namespace-uri()=$ns1) or (local-name()=$name2 and namespace-uri()=$ns2) or (local-name()=$name3 and namespace-uri()=$ns3) or (local-name()=$name4 and namespace-uri()=$ns4) or ...]"/> where I also have to declare variables $ns1, $ns2, $ns3, $ns4, ... as well as know that (and hard-wired) local-name $name1 is used with uri $ns1, and local-name $name2 is used with with uri $ns2, and local-name $name3 is used with uri $ns3, and local-name $name4 is used with uri $ns4, and ... and where maintenance and debugging can also start to get tricky. Even your initial proposal to use <xsl:copy-of select="*[@self::attribution]"/> is really <xsl:copy-of select="*[@self::ns:attribution]"/> if not in the default or no namespace namespace matching the prefix and not the uri What do you think? Thanks, ac At 2009-09-25 11:41 -0400, ac wrote:What should be done if the element name is in an attribute or variable, as
|

Cart



