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:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0" result-ns=""> <xsl:template name="Wrapper"> <xsl:param-variable name="Content"/> <!-- ADDED THIS LINE --> <xsl:element name="W"> <xsl:copy-of select="$Content"/> </xsl:element> </xsl:template> <xsl:template match="C"> <xsl:call-template name="Wrapper"> <xsl:param name="Content"> <xsl:attribute name="B">b value</xsl:attribute> </xsl:param> </xsl:call-template> </xsl:template> </xsl:stylesheet> applied to <C B="hello"> <xxx/> c text </C> produces no error and this output <W B="b value"/> which is I think what you wanted? David XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Fw: XSL macros stronger then XSLT, Oren Ben-Kiki | Thread | Calling java method, Dave Pawson |
RE: How do you this XML document to, Francois_Deza | Date | Re: Charset conversions, Duane Nickull |
Month |