Subject: RE: [xsl] xsl:script (again) From: Bagchi Ratul <bratul@xxxxxxxx> Date: Thu, 7 Mar 2002 13:17:24 +0100 |
replace the line <xsl:value-of select="xslscript:SalesPos() "/> with <xsl:value-of select="user:SalesPos() "/> and your problem will be solved. Best of Luck. Ratul. -----Original Message----- From: Alia Mikati [mailto:Aliam@xxxxxxxxxxxxxxxxxxxx] Sent: Thursday, March 07, 2002 5:46 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] xsl:script (again) Hi again, this is my code and I used the method u told me about. <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:xslscript="http://mycompany.com/mynamespace" version="1.0"> <msxsl:script language="vbScript" implements-prefix="xslscript"> <![CDATA[ SalesPosition=1 function SalesPos() SalesPos=SalesPosition SalesPosition=SalesPosition+1 end function ]]> </msxsl:script> <xsl:template match="/"> <table border="1"> <tr> <td><b>Position</b></td> <td><b>Name</b></td> <td><b>Units Sold</b></td> </tr> <xsl:apply-templates select="SalesDept" /> </table> </xsl:template> <xsl:template match="SalesDept"> <xsl:apply-templates select="Salesperson" /> </xsl:template> <xsl:template match="Salesperson"> <tr> <td> <xsl:value-of select="xslscript:SalesPos() "/></td> <td> <xsl:value-of select="Name" /> </td> <td> <xsl:value-of select="Sales" /> </td> </tr> </xsl:template> </xsl:stylesheet> But I got as output: SalesPosition=1 function SalesPos() SalesPos=SalesPosition SalesPosition=SalesPosition+1 end function function calcul(node) m=node.childnodes.item(1).text n=node.childnodes.item(2).text calcul=m*n end function Can u help me plz and tell me what's the problem???? Thx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xsl:script (again), Jeni Tennison | Thread | AW: [xsl] error in javascript, that, "Braumüller, Hans" |
RE: [xsl] xsl:script (again), Julian Reschke | Date | Re: [xsl] xsl:script (again), Jeni Tennison |
Month |