[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: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Mon, 18 Apr 2005 07:33:59 +1000
bowles metrics
On 4/18/05, Lars Marius Garshol <larsga@xxxxxxxxxxxxxxx> 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

Dimitre Novatchev.

Current Thread


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.
First Name
Last Name
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.