Subject: Re: [xsl] problem with Passing Parameters to Templates From: David Carlisle <davidc@xxxxxxxxx> Date: Mon, 22 Jan 2001 16:28:28 GMT |
> And the xsl file will be something like: easier if you give complete example something like: <z> <codec>1234</codec> <desc>5678</desc> </z> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" > <xsl:output method="xml" indent="yes"/> <xsl:template match="/"> <xsl:call-template name="opt_template"> <xsl:with-param name="node" select="'codec'"/> </xsl:call-template> <xsl:call-template name="opt_template"> <xsl:with-param name="node" select="'desc'"/> </xsl:call-template> </xsl:template> <xsl:template name="opt_template"> <xsl:param name="node"></xsl:param> [<xsl:value-of select=".//*[local-name()=$node]"/>] </xsl:template> </xsl:stylesheet> bash-2.01$ xt codec.xml codec.xsl <?xml version="1.0" encoding="utf-8"?> [1234] [5678] bash-2.01$ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] problem with Passing Para, helen li | Thread | Re: [xsl] problem with Passing Para, David Carlisle |
[xsl] Unique Text, Mike Moran | Date | Re: [xsl] problem with Passing Para, helen li |
Month |