This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: how to pass parameters (msxml/xt/Saxon)


> <xsl:template match="/">
> <!-- ... -->
> 	<xsl:apply-templates mode="Xrevised">
> 		<xsl:with-param name="xyz" select="1234"/>
> 	</xsl:apply-templates>
> <!-- ... -->
> </xsl:template>
> 
> <xsl:template match="text()" mode="Xrevised">
> <xsl:param name="xyz"/><!--<xsl:param name="xyz" select="678"/>-->
>            <xsl:text>template output:</xsl:text><br />
> 		   <xsl:value-of select="$xyz"/> <br />
> </xsl:template>
> 
Unless the root node has text children, which it won't if the input is a
well-formed tree, the first template doesn't call the second directly, it
does so via a built-in template for element nodes. The built-in template
does not pass the parameters through.

Mike Kay 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]