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

Re: Leventhal's challenge misses the point

Subject: Re: Leventhal's challenge misses the point
From: "Guy Murphy" <guy-murphy@xxxxxxxxxxxxx>
Date: Sat, 29 May 1999 14:57:00 +0100
guy murphy
Hi Miles.

You can do the study for yourself.

Produce the DOM+ECMAScript version of the following...

<xsl:template match="//section/title">
    <h1><xsl:value-of /></h1>
</xsl:template>

Which *might* look like...

var sections = xmlDoc.getElementsByTagName('section');
for (var i = 0; i < sections.length; i++) {
    var titles = sections[i].getElementsByTagName('title');
    for (var j = 0; j < titles.length; j++) {
        document.write('<h1>'+titles[j].nodeValue+'</h1>');
    }
}

[Note: the above script will need to be edited if moved to the server. The
document.write will need to be changed to whatever writing mechanism
supported.]

Now god forbid that we should throw filters into the equation, and all the
condition checking that would bring to the ECMAScript.

Now imagine that you're project manager comes to you after you've produced
all this script and says that she's arranged for tha chaps in dept. X to
have use of the styling, but they want to use it on the server-side, and oh,
they're Unix geeks and want it in Perl, would you be a dear and port it to
Perl for them, or Python, or TCL.

You see Miles, as a Web designer who specialised in DynamicHTML I have used,
do use and will continue to use script. But I don't need to see studies to
know that for this *programmer* XSL is esier for styling than script. On
that basis I can only suppose that a non-programmer may care to just skip
the programming and go straight to the XSL.

XSL take care of the querying, iteration, and recursion for you. It's
template declarations are easier to build up incrimentaly, test, and change.

There are some situations when use of DOM+Script is necessary. I don't
intend to use DOM+Script except when I have to. And I don't have to for
styling.

Others may prefer a different approach, which is cool. I wouldn't insist you
use XSL if you find scripting easier. Michael is trying to insist I use
Script despite my preference.

Cheers

    Guy

----- Original Message -----
From: Miles Sabin <msabin@xxxxxxxxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxx>
Cc: Nathan Langley <NLangley@xxxxxxxxxxxxxxxxxxx>
Sent: Friday, May 28, 1999 12:31 PM
Subject: RE: Leventhal's challenge misses the point
[SNIP]

>
> Do you have any evidence to support the claim that non-
> programmer designers will have an easier time with
> declarative languages than with imperative ones? The
> HCI person sitting next to me wants to see the usability
> studies ...
>
> Cheers,
>
>
> Miles
>
[SNIP]


 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.