Re: [xsl] Measuring the complexity of XSLT stylesheets
by M. David Peterson other posts by this author
Apr 17 2005 2:52PM messages near this date
Re: [xsl] Measuring the complexity of XSLT stylesheets
|
Re: [xsl] Measuring the complexity of XSLT stylesheets
& XSLT > Another example -- perceived complexity. FXSL stylesheet modules are
> mostly short and arguably contain not too complex xslt program units.
> However, not many people understand what these templates/functions are
> doing.
What amazes me when I study the work of the truly great programmers
such as Dimitre and his FXSL Functional XSLT library is that there
tends to be one very common trait among them -- simplicity. One of my
favorite quotes from Tim Bray is that the more mature a specification
becomes the smaller it gets. With each new iteration of a working
draft comes less sheets of paper, not more. It seems that with wisdom
comes the understanding that its easier to accomplish more when you
stop trying to acomplish it all.
On 4/17/05, Dimitre Novatchev <dnovatchev@[...].com> wrote:
> On 4/18/05, Lars Marius Garshol <larsga@[...].no> wrote:
> >
> > * Dimitre Novatchev
> > |
> > | [...]
> > | Cyclomatic Complexity (McCabe) [...]
> > | Halstead Complexity Measures [...]
> > | Henry and Kafura metrics [...]
> > | Bowles metrics [...]
> > | Troy and Zweben metrics [...]
> > | Ligier metrics [...]
> >
> > These might all be applicable, but does anyone know of any
> > implementations of these for XSLT?
>
> I don't know of any implementations for XSLT -- these would be best
> implemented as part of an XSLT processor.
>
> It is a bit challenging, though, as there are at least two languages
> intermixed in XSLT. One could implement XSLT complexity metrics and
> not provide XPath metrics -- the result would not be too-usable.
>
> Take as example FXSL for XSLT 2.0. Some of the functions are written
> in an exclusively "XPath-only style", where almost 100% of the
> processing is expressed within an XPath 2.0 expression. Therefore, to
> judge the complexity of such an xsl:function one needs complexity
> metrics for XPath 2.0.
>
> There are still other challenges: how would one estimate the
> complexity of "user datatypes" defined inline (using XML Schema or
> not), which may be dynamically growing linear or recursive tree or
> graph structures?
>
> What if the xslt "logic" is something extremely simple that just
> traverses very complex data structures?
>
> Another example -- perceived complexity. FXSL stylesheet modules are
> mostly short and arguably contain not too complex xslt program units.
> However, not many people understand what these templates/functions are
> doing.
>
> Cheers,
> Dimitre Novatchev.
>
> --~------------------------------------------------------------------
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail: <mailto:xsl-list-unsubscribe@[...].com>
> --~--
>
>
--
<M:D/>
:: M. David Peterson ::
XML & XML Transformations, C#, .NET, and Functional Languages Specialist
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@[...].com>
--~--
Thread:
Lars Marius Garshol
Anthony B. Coates
James Fuller
Dimitre Novatchev
Lars Marius Garshol
Dimitre Novatchev
Adam Turoff
M. David Peterson
Sebastien Arbogast
Lars Marius Garshol
Jirka Kosek
Lars Marius Garshol
James Fuller
Lars Marius Garshol
Colin Paul Adams
M. David Peterson
M. David Peterson
Jun Zhang
M. David Peterson
Francesco Barresi
Ben Pickering
Lars Marius Garshol
M. David Peterson
Colin Paul Adams
|