Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 5th, 2005, 02:05 PM
Registered User
 
Join Date: Mar 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Code not working billytikky88 C# 1 February 17th, 2008 03:20 PM
Code not working well vinish Beginning PHP 2 November 11th, 2005 08:02 PM
Working with code behind - How To pinkuisadear ASP.NET 1.0 and 1.1 Basics 7 March 11th, 2005 01:13 AM
Chapter 8, Report Scripting, Code errors jmurdock BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 5 June 23rd, 2004 11:50 AM
code not working Toka1 Javascript How-To 12 December 17th, 2003 05:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.