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

RE: Re: EXSL's dyn:evaluate() and XALAN vs. xsl:use-at

Subject: RE: Re: EXSL's dyn:evaluate() and XALAN vs. xsl:use-attribute-sets
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Sun, 24 Aug 2003 08:23:40 +0100
exsl win
> 
> Is there any behaviour of use-attribute sets that isn't more easily
> achievable using normal variables?
> 
> I've used xslt probably most days since the first working drafts and
> I've _never_ once found any use for this feature.
> 

Unlike a global variable, the result of expanding an attribute set can
be different on different occasions - the result can depend on the
context node. So they are more like a restricted kind of
xsl:call-template with no parameters than like global variables.

But I can't think of anything that attribute sets can do that
call-template can't do just as easily. In my view they are historic.
Attribute sets were in the first published working draft of XSLT 1.0
(Aug 1988, http://www.w3.org/TR/1998/WD-xsl-19980818) but named
templates were only introduced later (April 1999,
http://www.w3.org/TR/1999/WD-xslt-19990421) having evolved from an
earlier facility - macros (Dec 1998,
http://www.w3.org/TR/1998/WD-xsl-19981216). 

I might be wrong, but I suspect this was part of the "should XSLT be a
general-purpose programming language?" debate. Named templates are
clearly a general-purpose programming construct, whereas attribute-sets
were designed specifically to emulate features in cascading stylesheets.
In the end, in  my view, general purpose programming constructs always
win over special-purpose constructs.

Michael Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.