RE: [xsl] stylesheet expansion

Subject: RE: [xsl] stylesheet expansion
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 11 Dec 2007 10:58:34 -0000
> So the requirement is to be able to combine multiple 
> stylesheets into a single deliverable...which "compiled 
> stylesheet modules" would fit perfectly.

I've logged a requirement on the "future enhancements" list with the working
group.

The design of the XSLT language currently makes separate compilation of
modules rather difficult, because there are so few constraints on what an
overriding stylesheet can do. For example you might think a function call is
safe because you've checked the argument types at compile time, but there's
nothing to stop an importing stylesheet overriding the function with one
that has a completely different signature. We looked at this issue briefly
during 2.0 development, but filed it under "too difficult".

To make separate compilation viable, I think we need a more disciplined
approach that constrains what importing stylesheets can do. It should
possible also allow them to do more than they can currently do, for example
"aliasing" the default mode used by imported stylesheets so that it does not
interact with the default mode used by other imported stylesheets.

Michael Kay
http://www.saxonica.com/ 

Current Thread