Scripting code not working in XSL
Hi All,
I've got some scripting code that modifies a date in my transformation from xml to html. The code does not throw an error but it does not display the date. I just get a blank page and there is no html source code. Here is the code I'm using for the script...
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:vbdate="urn:schemas-xmlpitstop-com:vbdate">
<xsl:output method="html" media-type="text/html" encoding="UTF-8" />
<msxml:script language="VBScript" implements-prefix="vbdate">
function VBDateAdd(strDate1)
VBDateAdd = DateAdd("h", -4, strDate1)
end function
</msxml:script>
<table width='171' border='0' cellspacing='0' cellpadding='0' bgcolor='#CCCCCC'>
<tr align='center' valign='top'>
<td colspan='2'>
<xsl:variable name="date" select="rpuData/essIdent/@TimeStamp" />
<xsl:value-of select="vbdate:VBDateAdd($date)" /> GMT
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>
This table is used as an asp include file in a larger web page.
Is there something wrong with the code? Any one have a suggestion on how to modify the xml date by 4 hours?
Thanks
|