xsl-list
[Top] [All Lists]

Re: [xsl] Any students looking for an interesting project?

2013-10-03 06:30:25
One of my colleagues has written a code coverage plugin for Saxon; he calls it "tectura." It counts up the number of times different lines of an XSLT file are executed. I think this empirical approach could get you a quick answer to the problem without the need for deep analysis. He has been planning to release the package as open source, but I don't think he has done that yet -- still I'm sure you could whip something up, and I bet your users would appreciate it, too.

-Mike

On 10/3/13 4:42 AM, Michael Kay wrote:
Here's an XSLT project that I think would be ideal for a bright student:

Given a stylesheet S, and a representative selection of input documents D, 
create a trimmed-down stylesheet S' that is equivalent to S when applied to any 
document in D, by eliminating all template rules that don't match anything in D 
(as well as other components like named templates and functions that become 
unreachable after this process).

It's a practical problem: the docbook stylesheets, for example, are far too 
large to run in Saxon-CE, but if trimmed down to contain only the rules needed 
for a particular docbook profile, might well be a tiny fraction of the size. 
Using trimmed-down stylesheets could also give performance benefits in many 
batch publishing workflows.

The only tricky part of the problem, I think, is dealing with any cases of 
template rules that are there to match nodes in temporary trees rather than 
nodes in a source document. One might be able to determine the set of element 
names used in temporary trees by static analysis, or to determine that 
xsl:apply-templates is never applied to a temporary tree, or perhaps to gather 
extra information by actually running S against D and monitoring what happens.

Michael Kay
Saxonica
--~------------------------------------------------------------------
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>
--~--



--~------------------------------------------------------------------
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>
--~--