Subject: Re: [xsl] Measuring the complexity of XSLT stylesheets From: Jirka Kosek <jirka@xxxxxxxx> Date: Sun, 17 Apr 2005 22:42:58 +0200 |
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@xxxxxxxx http://www.kosek.cz ------------------------------------------------------------------ Profesionalnm 9kolenm a poradenstvm v oblasti technologim XML. Podmvejte se na na9 novl spu9tln} web http://DocBook.cz Podrobn} pxehled 9kolenm http://xmlguru.cz/skoleni/ ------------------------------------------------------------------ [demime 1.01d removed an attachment of type application/x-pkcs7-signature which had a name of smime.p7s]
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Measuring the complexity , Lars Marius Garshol | Thread | Re: [xsl] Measuring the complexity , Lars Marius Garshol |
Re: [xsl] Measuring the complexity , Dimitre Novatchev | Date | Re: [xsl] Measuring the complexity , Lars Marius Garshol |
Month |