xsl-list
[Top] [All Lists]

RE: Importing stylesheets (overriding)

2003-05-06 14:45:28
In both cases of import and inclusion of stylesheets, these 
must occur Top Level.  This doesn't seem to be the solution 
I'm after, since I need to conditionaly choose my override template.

This used to be one of the top ten FAQs but I think it's been a few
weeks since it came up.

You can't do conditional includes or imports because they are done at
compile time, long before expressions can be evaluated.

The usual solution is to invert the import. Instead of having A
conditionally import B or C, have both B and C import A, and invoke
either B or C as the initial stylesheet to do the transformation.

Michael Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>