[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Use of xsl:apply-templates exception with an eleme

Subject: RE: Use of xsl:apply-templates exception with an element
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 25 Sep 2009 21:09:37 +0100
RE:  Use of xsl:apply-templates exception with an eleme
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.