Re: [xsl] Limitations of including/importing number of stylesheets into a stylesheets

Subject: Re: [xsl] Limitations of including/importing number of stylesheets into a stylesheets
From: Graydon <graydon@xxxxxxxxx>
Date: Mon, 29 Nov 2010 17:54:19 -0500
On Mon, Nov 29, 2010 at 09:11:31AM +0000, Michael Kay scripsit:
> The only case I've seen where this caused serious performance
> trouble was when one module was imported (not included) into many
> others, all at different import precedence. I've since fixed Saxon
> so this case is no longer a problem, but you might not be so lucky
> with other products. Generally, try to organize your code so each
> module is included/imported only once (the effect is global). Apart
> from that, I don't think you should have any concerns.

This brings up a further question.

I'm in the habit, when grouping XSLT templates into modules, of
importing any dependencies among the other files so the individual file
can be validated by itself.

The main stylesheet file, the one that's actually called when processing
the content, uses include, and there's a chain of includes going back
from the most specific templates in the main stylesheet file to the most
general in the first stylesheet.

Is this practice likely to be a performance hit?  I try hard to make it
a linear chain of dependencies, but this doesn't always work.

-- Graydon

Current Thread