This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Re: _why_ do people use xsl:element and xsl:attribute so much Was Re: xslt svg problem


> From:	David Carlisle [SMTP:davidc@nag.co.uk]
> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]