How to pass parameter to VBScript in XSL?

"Sudarshan Zawar" <[email protected]>
Newsgroups gmane.text.xml.xslt.extensions
Message-ID <[email protected]>
Hi,

I am translating one xml into another using stylesheet.
My input xml has the tag 
<DueDateTime>06/30/2005 23:59:00</DueDateTime>

Now in output xml, i have to deduct one day from this date.
In the stylesheet i have written the following script like this.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:vbs="urn:schemas-sqlxml-org:vbs" 
version="1.0">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<msxsl:script language="vb-script" implements-prefix="vbs">
<![CDATA[
     Function fnDate(DueDateTime)
       fndate = cstr(DATEADD("d",-1,DueDateTime))
     End Function          
]]>
</msxsl:script>

Now i am calling the above script in the following trasnformation.
<Start>
  <xsl:value-of disable-output-escaping="yes" select="vbs:fnDate(@DueDateTime)"/>
</Start>

But i its giving the error.

If i directly pass the value as written below, it works.
<Start>
  <xsl:value-of disable-output-escaping="yes" select="vbs:fnDate('05/05/2005')"/>
</Start>

Can you please help me regrding this? I want to pass the node value of DueDateTime in the function. I think there is something wrong with the parameter passing.

Thanks and Regards,
Sudarshan 

Sudarshan Zawar

_______________________________________________
exslt mailing list
[email protected]
http://www.exslt.org/list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.