NOTE:
These slides have not been updated since 2003. They have been superseded by the book
Anders Møller and Michael Schwartzbach, February 2006 |
THE XML REVOLUTION - TECHNOLOGIES FOR THE FUTURE WEB |
Use:
Example 1:
<xsl:template match="foo"> <xsl:variable name="X" select="42"/> <xsl:variable name="Y"> <sometag><xsl:value-of select="@bar"/></sometag> </xsl:variable> <first> <xsl:value-of select="$X"/> <xsl:copy-of select="$Y"/> </first> <second> <xsl:value-of select="$X"/> <xsl:copy-of select="$Y"/> </second> </xsl:template> |
Example 2:
... <xsl:apply-templates select="item"> <xsl:with-param name="COLOR" select="'blue'"/> </xsl:apply-templates> ... <xsl:template match="item"> <xsl:param name="COLOR" select="'black'"/> <font color="{$COLOR}"> <xsl:apply-templates/> </font> </xsl:template> |
COPYRIGHT © 2000-2003 ANDERS MØLLER & MICHAEL I. SCHWARTZBACH |