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

RE: <quote>XSL is NOT easy</quote>

Subject: RE: <quote>XSL is NOT easy</quote>
From: "Angela Williams" <Angela.Williams@xxxxxxxxxxxxxxxxxx>
Date: Tue, 26 Jun 2007 10:03:02 -0500
RE:  <quote>XSL is NOT easy</quote>
Once you get it, it IS wonderful.  I have a background in procedural and
object-oriented programming. Making the leap to the XSLT mind set was
HARD - every day.  Eight months into the project I finally get it, in
all its glory, but I am the only one on my team who does.  Trying to
explain issues to my team mates so we can brainstorm solutions has been
next to impossible, because the paradigm is just not the same.

I think part of the problem is that there are wonderful references if
you know what you solution you need, but I haven't seen anything written
that helps professionals translate common programming principles to
XSLT.  Bruce Eckel wrote a great book that helps C programmers use what
they know about C to learn Java / OO principles.  If anyone is planning
a new book, including content such as "if you are used to doing x, use y
in XSLT" would really help.

" actually I find that most of the really bad code is written by
programmers... The people that do these things are not amateurs. (mores
the pity)"

Don't be a hater. :-) We use what we know, until we know better.

"classical sins:
overuse of for-each. "

There is no other way to do this in many programming languages.  Again,
we use what we know, until we know better.

"2. code was littered with stuff like <xsl:if test="count(record) &gt;
0"><xsl:apply-templates select="record"/></xsl:if>"

Checking for nulls and empty strings before trying to use a variable is
mandatory in many languages and a best practice with others.  It's not
surprising that initial efforts to learn XSLT are littered with this.

That said, I've spent the past week re-factoring my early code to remove
for-each and xsl:if's.  When we know better, we do better...


Thanks!
Angela

-----Original Message-----
From: bryan rasmussen [mailto:rasmussen.bryan@xxxxxxxxx]
Sent: Tuesday, June 26, 2007 2:02 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  <quote>XSL is NOT easy</quote>

actually I find that most of the really bad code is written by
programmers.


2. code was littered with stuff like <xsl:if test="count(record) &gt;
0"><xsl:apply-templates select="record"/></xsl:if>

The people that do these things are not amateurs. (mores the pity)

Cheers,
Bryan Rasmussen

On 6/26/07, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> > XSL is NOT easy if
> > you want to code professionally in it. It IS easy to use XSL but not

> > well. ....
>
> I would agree with this entirely. But then, I think it's true of every

> other programming language as well. There is an enormous amount of bad

> unmaintainable code being written by self-taught amateur programmers,
> in all sorts of languages, and many of them are attracted to languages

> like XSLT that look easy at first sight.
>
> Michael Kay
> http://www.saxonica.com/

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.