Subject: Re: [xsl] Measuring the complexity of XSLT stylesheets From: "M. David Peterson" <m.david.x2x2x@xxxxxxxxx> Date: Sun, 17 Apr 2005 12:53:20 -0600 |
> been written in a declaritive foundation oops... that would be procedural now wouldnt it... On 4/17/05, M. David Peterson <m.david.x2x2x@xxxxxxxxx> wrote: > 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 > -- <M:D/> :: M. David Peterson :: XML & XML Transformations, C#, .NET, and Functional Languages Specialist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Measuring the complexity , M. David Peterson | Thread | Re: [xsl] Measuring the complexity , Jun Zhang |
Re: [xsl] Measuring the complexity , M. David Peterson | Date | Re: [xsl] Measuring the complexity , M. David Peterson |
Month |