This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: several questions on XML to HTML processing with XSL
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: several questions on XML to HTML processing with XSL
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Tue, 13 Jun 2000 17:56:19 +0100
- Reply-To: xsl-list at mulberrytech dot com
> I thought it would be nice to do something like this, but I
> couldn't get it to work (does anybody know if a construct
> like this is possible):
> <xsl:variable name="ParamName">param2</xsl:variable>
> <xsl:template match="blah_blah">
> <xsl:call-template name="SomeTemplateName">
> <xsl:with-param>
> <xsl:attribute name="name">
> <xsl:value-of select="$ParamName"/>
> </xsl:attribute>
> </xsl:with-param>
> </xsl:call-template>
> </xsl:template>
No. <xsl:with-param> creates the root node of a new tree. You can't call
<xsl:attribute> unless the current node on the current output tree is an
element; in this case it isn't, it's a root. Root nodes can't have
attributes.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list