Used to import the contents of one stylesheet module into another.
A URL (absolute or relative) of another stylesheet to be textually included within this one.
To customize the way in which the
If the URI is relative, then it is interpreted relative to the base URI of
Available in XSLT 1.0 and later versions. Available in all Saxon editions. Available for all platforms.
Notes on the Saxon implementation
XSLT 3.0 removes the restriction that
xsl:import elements must
precede all others in the stylesheet. Since Saxon 9.5 this restriction was
removed provided that XSLT 3.0 is enabled; in Saxon 9.8 it was removed entirely.
xsl:import element is always used at the top level of the
stylesheet. In XSLT 2.0 it must appear before all other elements at the top
level, but XSLT 3.0 removes this restriction. The top-level elements of the
included stylesheet effectively replace the
xsl:import element may also be used at the top level of the
included stylesheet, and so on recursively.
The elements in the importing stylesheet have higher precedence than the elements in the
imported stylesheet, and later imports within the same stylesheet have higher precedence
than earlier imports. The main effect of this is on selection of a
xsl:apply-templates is used: if there is a matching
template with precedence X, all templates with precedence less than X are
ignored, regardless of their priority.