wiki:TestingXSLT/XSLTMetrics

XSLT Metrics

XSLT Metrics ( http://code.menteithconsulting.com/wiki/XSLTMetrics), by Tony Graham, is a stylesheet for some descriptive, rather than prescriptive or proscriptive, metrics about what's in a stylesheet. The purpose of the metrics is finding out what's in a stylesheet rather than telling you how to write your stylesheet.

The metrics stylesheet is written in XSLT 1.0 so it usable by the maximum number of people.

Current sample output from the DocBook XSLT stylesheets:

Stylesheets: 61
  With comments: 54
    Both preceding and containing comments: 0
    Preceding comments only: 0
    Containing comments only: 0
Templates: 1833
  With comments: 446
    Both preceding and containing comments: 56
    Preceding comments only: 151
    Containing comments only: 239
  Named templates: 421
    Recursive: 0
  Moded templates: 933
    Named moded templates: 2
Imports: 3
Includes: 57