RE: several questions on XML to HTML processing with XSL

Subject: RE: several questions on XML to HTML processing with XSL
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Tue, 13 Jun 2000 17:56:19 +0100
> 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


Current Thread