[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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)
Re: Fw: XSL macros stronger then XSLT
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.