<?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet href="../make-menu.xsl" type="text/xsl"?><html> <head> <this-is section="xsl-elements" page="import" subpage=""/> <!-- Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: xsl:import</title> <meta name="coverage" content="Worldwide"/> <meta name="copyright" content="Copyright Saxonica Ltd"/> <meta name="title" content="Saxonica: XSLT and XQuery Processing: xsl:import"/> <meta name="robots" content="noindex,nofollow"/> <link rel="stylesheet" href="../saxondocs.css" type="text/css"/> </head> <body class="main"> <h1>xsl:import</h1> <p>The <code>xsl:import</code> element is always used at the top level of the stylesheet, and it must appear before all other elements at the top level. It has a mandatory <code>href</code> attribute, which is a URL (absolute or relative) of another stylesheet to be textually included within this one. The top-level elements of the included stylesheet effectively replace the xsl:import element.</p> <p>The <code>xsl:import</code> element may also be used at the top level of the included stylesheet, and so on recursively.</p> <p>The elements in the imported stylesheet have lower precedence than the elements in the importing stylesheet. The main effect of this is on selection of a template when 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.</p> <p>To customize the way in which the <code>href</code> attribute is handled, a user-written <code>URIResolver</code> can be supplied. See also <a class="bodylink" href="../sourcedocs/xml-catalogs.xml">Using XML Catalogs</a>.</p> <table width="100%"> <tr> <td> <p align="right"><a class="nav" href="import-schema.xml">Next</a></p> </td> </tr> </table> </body> </html>