[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Re: Can not convert #STRING to a NodeList! Error..
Thanks Dimitre, On seeing the process of execution,(in xmlspy), from Default Template, control comes to my third template. I also think the same that default template is not passing anyparameters to my third template.. I am giving my code: minimal possible one. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:key name="label" match="labels/label" use="@name"/> <!-- parameter to get the current user's language--> <xsl:param name="language" select="'en'"/> <xsl:template match="/"> (first) <xsl:choose> <xsl:when test="$language='en'"> <xsl:call-template name="main"> <xsl:with-param name="labelsfile" select="document('English.xml')"/> </xsl:call-template> </xsl:when> <xsl:when test="$language='fr'"> <xsl:call-template name="main"> <xsl:with-param name="labelsfile" select="document('French.xml')"/> </xsl:call-template> </xsl:when> </xsl:choose> </xsl:template> <xsl:template name="main">(second) <xsl:param name="labelsfile"/> <xsl:for-each select="$labelsfile"> <!-- works fine --> <xsl:value-of select="key('label','ecollab.purchaseorder')"/> </xsl:for-each> <xsl:apply-templates> <xsl:with-param name="labelsfile" select="$labelsfile"/> </xsl:apply-templates> </xsl:template> <xsl:template match="HEADER">(third) <xsl:param name="labelsfile"/> <xsl:for-each select="$labelsfile"> <!-- Doesnt works --> <xsl:value-of select="key('label','ecollab.businessfollowedby')" /> </xsl:for-each> </xsl:template> <xsl:stylesheet> sample XML ------------------ <PUR-ORD> <DOCTYPE-ID>PO</DOCTYPE-ID> <CONTACT>610223</CONTACT> <!-- value of above nodes are printed by default template --> <PO> <HEADER>header information</HEADER> </PO> </PUR-ORD> What should I do to solve this problem. thanks in advance regards s.arun prasath From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: Re: Can not convert #STRING to a NodeList! Error.. Date: Sun, 9 Nov 2003 16:43:19 +0100 _________________________________________________________________ Access Hotmail from your mobile now. http://server1.msn.co.in/sp03/mobilesms/ Click here. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|