Parameters can be used in the same way as variables.
XSLT <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/aaa"> <xxx> <xsl:apply-templates select="bbb"/> </xxx> <yyy> <xsl:apply-templates select="bbb"> <xsl:with-param name="A" select="bbb/ccc"/> </xsl:apply-templates> </yyy> </xsl:template> <xsl:template match="bbb"> <xsl:param name="A" select="/aaa/bbb/ccc[last()]"/> <xsl:copy-of select="$A"/> </xsl:template> </xsl:stylesheet> |
|
XML <aaa> <bbb> <ccc r="1"/> <ccc r="2"/> <ccc r="3"/> </bbb> </aaa> | Output <xxx> <ccc r="3"/> </xxx> <yyy> <ccc r="1"/> <ccc r="2"/> <ccc r="3"/> </yyy> |
Previous chapter: | Named-Templates |
Next chapter: | Stylesheet Functions |
Previous page: | Default values of parameters |
Next page: | Difference between parameters and variables |
You can also get Organic Skin Care products from Bliss Bath Body and you must check out their Natural Body Lotions and bath soaps
Now if you are looking for the best deals on surf clothing from Quiksilver and Roxy then you have to check these amazing deals here:
Hey, check out this Organic Skin Care European Soaps along with Natural Lavender Body Lotion and shea butter
and we can get surf t shirts surfing shirt and And you must check out this website swim suit swimming suit and swim trunks