Subject: RE: [xsl] <quote>XSL is NOT easy</quote> From: "Angela Williams" <Angela.Williams@xxxxxxxxxxxxxxxxxx> Date: Tue, 26 Jun 2007 10:03:02 -0500 |
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) > 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: [xsl] <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) > 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] <quote>XSL is NOT easy</q, Andrew Welch | Thread | RE: [xsl] <quote>XSL is NOT easy</q, Angela Williams |
RE: [xsl] XTDE1490 and using the Sa, Michael Kay | Date | RE: [xsl] <quote>XSL is NOT easy</q, Brian Martinez |
Month |