only for RuBoard |
xsl:import imports the referenced XSLT stylesheet. Any template rules in the stylesheet take precendence over the included template rules.
Attribute Name | Enforced | Description | Values |
---|---|---|---|
href | Required | The location of the XSLT stylesheet to import | URI Reference |
Given the following XML instance document, links.xml :
<links> <link name="NewRiders.com" URL="http://www.newriders.com" /> <link name="Xmlandasp.net" URL="http://www.xmlandasp.net" /> <link name="MSDN Online Library" URL="http://msdn.microsoft.com/library" /> </links>
The following stylesheet selects the node list containing all link nodes. Each iteration applies the local template that outputs the name attribute and the <br/> tag:
<?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:import href="styles.xsl"/> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> </xsl:stylesheet>
This stylesheet imports template rules from style.xsl , as shown here:
<?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="links/link"> <tr> <td> <xsl:value-of select="@name" /> </td> </tr> </xsl:template> </xsl:stylesheet>
This imports all the template rules and definitions from styles.xsl . Furthermore, if a template rule for the root context is provided, the current template rule overrides it.
xsl:stylesheet or xsl:transform
None.
only for RuBoard |