xsl-list
[Top] [All Lists]

Re: [xsl] metrics for evaluating xsl-t?

2006-08-23 04:46:47
On 8/23/06, Michael Kay <mike(_at_)saxonica(_dot_)com> wrote:
> > Wondering if anyone has given any thought to a metrics for
> evaluating
> > the complexity of a stylesheet based solution? can be XSL-T
> 2.0 only.
>
>   IMHO it depends on your definition for complexity.

I think he's looking for a definition.

Yes, part of what I am looking for is a definition. I have personal
opinions, and I suppose most of us know when we consider that a
stylesheet is complex or more complex than it should be.



I think the question was asked in terms of static complexity - number of
modules, templates, functions, and their degree of interrelatedness.


Probably need to identify complexity in xpath to be useful, but yes,
those were part of the metrics.

Things I might assume to apply:

Number of includes, imports..

Reuse, overriding of templates..

use of apply-templates vs. apply-templates select..

number of modes, number of priority


use of entitities....
---








I've never been sure how useful such metrics are.

Most of the time not useful. I do have one project where it might be
useful to have a metric defined, as I could use it to test a large
number of stylesheets, not all of them mine, and flag some for
possible improvements.

At higher levels such metrics can turn into recommendations for
transformation structure to particular types of tasks or for
applications needing to handle large numbers of input or output
formats.

An example rule at a high level can be:  Put named templates into a
named template xsl for import. override as needed.

Thus if one has a named template not an override of a named template
in the named templates xsl flag stylesheet for checking by top level
transformation maintainer - that would be you, Michael - and so forth.

complexity is probably one of the top things we want to reduce in an
application, thus we need a metric to identify at least possible
complexity in order to automate checking for it.

I have made some preliminary things in this direction but was hoping
others had some stuff as I always feels somewhat uncomfortable making
an argument without seeing what other opinions are on the matter,
since what I perceive as important can on consideration turn out only
to be based on personal preference.

Cheers,
Bryan

--~------------------------------------------------------------------
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(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--