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

Re: Measuring the complexity of XSLT stylesheets

Subject: Re: Measuring the complexity of XSLT stylesheets
From: "M. David Peterson" <m.david.x2x2x@xxxxxxxxx>
Date: Sun, 17 Apr 2005 12:50:54 -0600
is xquery declaritive
There all right but let me add one more little thing.  XSLT is a
template language and when written in its more
functional/template-based nature XSLT is really quite easy and doesnt
require complexity to get proper results.  The problem as I see it
(and Colin pointed this out to a nice example of using XPath... people
tend to force XPath to do TONS of heavy lifting when in reality you
just have to let the XML fall gracefully until targeted by the best
matching template and then captured and processed accordingly) is that
our core focus for so many years has been to have COMPLETE and TOTAL
control at every moment using procedural coding that we all tend to
force the issue with XSLT (you will do this and do this now! kind of
thing) instead of letting the issue happen and then dealing with it
when it does...  laaaaazzzzyyyy style ;)  When you step back from that
mentality and simply design your XML and XSLT in such a way that there
is no need to climb up and down the tree to process the data then XSLT
is never complex.  It may take a little getting used to the style and
as such seem a bit complex but after you just "let go and let God" as
the saying goes then your mind adjusts and it simply makes sense.  It
seems to me that just about the time you find yourself having to write
complex code to make something work in XSLT is right about the time
you need to rethink things and realize you are doing things the hard
way (the procedural side of your brain if you will) and that there is
a much simpler approach that will work twice as efficient if you block
the procedural line of thinking and embrace the template-based
functional side of your brain

As a side note....  given the fact that God is an obvious functional
programmer it seems fairly apparent that the first seven days were
more than likely written in XSLT at first and then stupified by Satan
to make them seem like it all happened procedurally... thus all the
clouded mystery and such when in reality things just happenened in
their natural order and sequence... then again who would want to read
a book that didn't have fire and smoke and burning things to keep our
interest...  guess it makes sense... with lightness there must be
darkness, good? then theres got to be bad... truth?  here come the
liars...  XSLT?  Hmmm.... its too bad XQuery couldnt have been written
in a declaritive foundation as it would have made this last paragraph
more fun...  Damn recursion ;)

On 17 Apr 2005 18:52:07 +0100, Colin Paul Adams
<colin@xxxxxxxxxxxxxxxxxx> wrote:
> >>>>> "Lars" == Lars Marius Garshol <larsga@xxxxxxxxxxx> writes:
>
>    Lars> | to be honest if you could define XPATH expression
>    Lars> complexity then | you have most the battle won.
>
>    Lars> True, but my problem so far is that I can't. :)
>
> Well, the length of the XPATH expression in characters gives an idea,
> I think.
> --
> Colin Paul Adams
> Preston Lancashire
>
>


--
<M:D/>

:: M. David Peterson ::
XML & XML Transformations, C#, .NET, and Functional Languages Specialist

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.