[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] Re: EXSL's dyn:evaluate() and XALAN vs. xsl:use-attribute-sets
Subject: RE: [xsl] 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 |
> > 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Re: EXSL's dyn:evaluate(), David Carlisle | Thread | [xsl] xslt.jd param in java (produc, Burghard Güther |
RE: AW: [xsl] why is "(chapter//foo, Michael Kay | Date | [xsl] XSL extensions and namespaces, Scott Powell |
Month |
Keywords