W3C home > Mailing lists > Public > www-xsl-fo@w3.org > June 2003

Re: linking stylesheets...

From: Mike Haarman <mhaarman@infinitecampus.org>
Date: Thu, 12 Jun 2003 10:57:49 -0500
Message-ID: <004901c330fb$5fc90540$c70aa8c0@ic.org>
To: <www-xsl-fo@w3.org>

----- Original Message ----- 
From: "Ryan Caruso" <rcaruso@cdsys.com>

> simply want to be able to have multiple stylesheets and  call the ones I
> need from a "main" style sheet?


The top level instruction xsl:import is typically used for this:

<xsl:import href="properties.xsl"/>
<xsl:import href="propertiesLocal.xsl"/>
<xsl:import href="utilities.xsl"/>

These files have defined importance for evaluating template conflicts, that is,
templates in propertiesLocal.xsl will be used by preference to templates defined
in properties.xsl if the processor identifies multiple template matches.
Likewise, templates defined in the stylesheet which makes these imports override
like matching templates in the two imported files.

Because imports are top level elements, you cannot wrap imports in testing
blocks to switch on particular imports.

xsl:include incorporates another stylesheet at the point of reference, is not
constrained to the top-level and can thus be used in a switch.  Includes
however, do not have provision for import precedence and so template conflicts
are resolved as they would be if the included templates were part of the
including stylesheet at that point.

hth,

Mike
Received on Thursday, 12 June 2003 11:54:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:11 GMT