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

Re: Re: _why_ do people use xsl:element and xsl:attrib

Subject: Re: Re: _why_ do people use xsl:element and xsl:attribute so much
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 05 Sep 2001 15:46:26 -0400
xsl attrib
Hi Mike,

At 03:10 PM 9/5/01, you wrote:
Deborah Aleyne Lapeyre wrote:
>         xsl:element, xsl:attribute, etc.
> We decided that they were very useful advanced features,
> but way behind, for example, Named Templates as something
> that a beginner needs to know.

At the risk of having an unpopular opinion...

I would want beginners to have a good foundation for understanding
the XSLT processing model (tree access and construction) and the
relationship between XSLT and XML Namespaces. It seems to me that
teaching people about literal result elements as "text that is
copied through" rather than as "shorthand for instructions to
create nodes -- i.e., xsl:element, xsl:attribute, xsl:text, etc."
undermines their understanding of XSLT's most important concepts.

You're not going to get any argument from me (or, I dare say, Debbie). Downplaying the use of xsl:element etc. is not intended to undermine student's immediate grasp of the tree building model; in fact one of the main outcomes of the work on Day One of the course is an understanding that XSLT template are *not* "text that is copied through". We just do this without xsl:element etc.


I don't necessarily advocate thorough coverage of when & how to
use xsl:element and xsl:attribute, but they should at least be
mentioned in terms of their relationship to literal result
elements and the concept of result tree construction, IMHO.

Mentioning them, sure; but there are ratholes enough as it is. Our general approach is to give students a firm foundation (and plenty of hands-on experience) in the "push" approach to stylesheets on Day One. By the time the course is over, they've mastered template-based processing (including modes), and XPath holds no more mysteries for them. When we have time, we get more into stuff like pulling data, various kinds of dynamic processing (for which xsl:element and xsl:attribute are great), sorting and grouping, and so on.


It's true that in this case as in others, knowing something "advanced" sometimes provides helpful context -- sometimes even the spark for an "aha!" -- to get at something more "basic". XSLT actually has many such places. (Some might argue that you can't really understand what's going on unless you have a complete grasp of the rules of whitespace stripping :-). I guess our aim is to give students a strong enough foundation that they can put the rest together on their own. When teaching, we certainly watch for opportunities for an "aha". But we don't build the course around them, since they're not very dependable (and students are so different).

Cheers,
Wendell



======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


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.