XSLT <xsl:include> element
tattara da amfani
<xsl:include> element ne top-level element, ya tsara aikiyarin da a fi zama a ciki daga aikiyarin da a fi zama a ciki.
shirin:aikiyarin da a fi zama a ciki (included style sheet) ta da girman aikiyarin da a fi zama a ciki (including style sheet).
shirin:elementin ya kamata a zama ƙaramin <xsl:stylesheet> ko <xsl:transform>.
kauyawa
<xsl:include href="URI"/>
hanyar
hanyar | dabam | shirin |
---|---|---|
href | URI | dabam. Ta ce sabunta hanyar da aikiyarin da a fi zama. |
shirin
masu 1
dalliwarin da aikiya a ciki da xulincludefile.xsl
<?xml version=1.0'?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" omit-xml-declaration="yes"/> <xsl:template match="/"> <xsl:for-each select="COLLECTION/BOOK"> <xsl:apply-templates select="TITLE"/> <xsl:apply-templates select="AUTHOR"/> <xsl:apply-templates select="PUBLISHER"/> <BR/> <!-- add this --> </xsl:for-each> </xsl:template> <xsl:template match="TITLE"> <DIV STYLE="color:blue"> Title: <xsl:value-of select="."/> </DIV> </xsl:template> <xsl:include href="/xsl/xslincludefile.xsl" /> </xsl:stylesheet>