[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: Fw: XSL macros stronger then XSLT

Subject: Re: Fw: XSL macros stronger then XSLT
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 29 Apr 1999 17:11:46 +0100 (BST)

> I got the following error message:
>     DID NOT EXPECT cannot convert to node-set
> I hope this is just a problem in XT

No I think it's just a problem of semantics (if I may mention semantics
on this list, which is of course mainly concerned with style)

The error message means:

You didn't declare the parameter in the template.


<xsl:template name="Wrapper">
   <xsl:param-variable name="Content"/> <!-- ADDED THIS LINE -->
    <xsl:element name="W">
        <xsl:copy-of select="$Content"/>

<xsl:template match="C">
    <xsl:call-template name="Wrapper">
        <xsl:param name="Content">
            <xsl:attribute name="B">b value</xsl:attribute>


applied to 

<C B="hello">
c text

produces no error and this output
<W B="b value"/>

which is I think what you wanted?


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

Current Thread