xsl-list
[Top] [All Lists]

Re: Measuring the complexity of XSLT stylesheets

2005-04-17 13:42:58
Lars Marius Garshol wrote:

I'm interested in the complexity of the stylesheet as perceived by a
human being. So a better measure for my purposes would be something

I think that many people think about XML as about hierarchical way of describing/storing data. XSLT by default traverses XML data from the root to the leaves using templates. If you need to access other axes than child and descendant in your stylesheet, then there is usualy some complexity behind your data from human perspecitive of view. So counting number of XPath expressions that use different axes than child and descendant might give you some metric not completely unrelated to complexity of input data and their processing. Or you can assign different weight to differents axes to make it more "scientific".

Each expression measured should be weighted by number of times it was really evaluated what is really hard to do in a general way but you can measure it quite easily using some XSLT profiler on real data.

                                Jirka

--
------------------------------------------------------------------
  Jirka Kosek     e-mail: jirka(_at_)kosek(_dot_)cz     http://www.kosek.cz
------------------------------------------------------------------
  Profesionální školení a poradenství v oblasti technologií XML.
     Podívejte se na náš nově spuštěný web http://DocBook.cz
       Podrobný přehled školení http://xmlguru.cz/skoleni/
------------------------------------------------------------------

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

<Prev in Thread] Current Thread [Next in Thread>