|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: problem with Passing Parameters to Templates
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








