<xsl:include> is literally like if you cut and pasted the included stylesheet into the one with the xsl:include line in, so other than a small hit to actually find and read the stylesheet its not going to make any difference.
xsl:import is slightly more complicated in that it has a lower precedence than the importing stylesheet, so if there are conflicting templates it may take longer to work out which one to call.
Having said that all of these things are effectively 'static' i.e. they don't change at runtime, so once your processor has run through the stylesheet and compiled it the actually processing will make no difference. Some processors (e.g. Saxon) even provides the facility to save the compiled stylesheet out if you are going to be running it over and over again, which I suspect will improve performance greatly.
Both top-level declarations (the technical term, much better than using 'tag' which can be misleading) have many benefits over simply making the code cleaner. They provide facilities for re-use, as well as the precedence facilities of xsl:include allowing you to effectively 'overload' a particular template in the parent stylesheet, in a similar style of abstract classes and class inheritance in object oriented programming languages.
/- Sam Judson : Wrox Technical Editor -/
|