[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
> > 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|