Subject: RE: Re: _why_ do people use xsl:element and xsl:attribute so much Was Re: xslt svg problem
From: "Dylan Walsh" <Dylan.Walsh@xxxxxxxxxx>
Date: Tue, 4 Sep 2001 16:31:52 +0100
|
> From: David Carlisle [SMTP:davidc@xxxxxxxxx]
> Sent: Tuesday, September 04, 2001 3:56 PM
>
>That I would say that xsl:element and xsl:attribute only be used (or
>shown to) advanced users who are needing to generate the
>element/attribute names based on the run time behaviour of the
>stylesheet rather than the far more usual case of generating fixed
names
>from the stylesheet or source.
I agree with your advice and add one, perhaps more frequent scenario,
the conditional creation of an attribute.
As to why beginners use these constructs where literals would suffice, I
have one explaination. If your are starting out in XSLT, you may decide
to look up the syntax for creating elements or attributes, and
<xsl:element> or <xsl:attribute> stick out as obvious candidates. I saw
this with a colleague who used <xsl:attribute> (in this case the values
were dynamic AVTs with the curly braces are not immeadiately obvious).
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|