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 August 5th, 2005, 11:07 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Quote:
quote:Originally posted by kwilliams
 I'm using the XMLDOM parser. Thanks
Quote:
quote:Originally posted by kwilliams
 I'm not using the MSXML parser
I'm confused. Can you a couple of lines of your transforming code?



--

Joe (Microsoft MVP - XML)
 
Old August 5th, 2005, 11:14 AM
Banned
 
Join Date: Jul 2005
Posts: 317
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here you go:
Code:
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" Debug="true" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
'Load XML
Dim xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = false
xml.load("xmldoc.xml")

'Load XSL
Dim xsl = Server.CreateObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load("xsldoc.xsl")

'Transform file
Response.Write(xml.transformNode(xsl))
%>
KWilliams
 
Old August 5th, 2005, 11:28 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Very strange, why use ASP.NET and then use the old style COM parser, which has a few problems being used from .NET?

Anyway, you can have a script block in the XSLT, see these articles for examples:

http://msdn.microsoft.com/library/de...asp?frame=true

and

http://msdn.microsoft.com/library/de..._incorporating

or you can pass the time in as a parameter after you have the date in the format required as in here:

http://msdn.microsoft.com/library/de...asp?frame=true






--

Joe (Microsoft MVP - XML)
 
Old August 5th, 2005, 11:39 AM
Banned
 
Join Date: Jul 2005
Posts: 317
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Great, thanks for the information. And concerning why I use that method, that's the method that I found at W3Schools' website:
Code:
<%
'Load XML
set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = false
xml.load(Server.MapPath("cdcatalog.xml"))

'Load XSL
set xsl = Server.CreateObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load(Server.MapPath("cdcatalog.xsl"))

'Transform file
Response.Write(xml.transformNode(xsl))
%>
I didn't think it was that big of a deal, because it works very well. But if you know of a better and/or more efficient way of parsing the data besides this method, please let me know. Thanks again for your help Joe.

KWilliams





Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie XSLT question fedehf XSLT 4 January 29th, 2008 03:09 PM
Calling external scripts from XSLT dextermagnific XSLT 2 June 25th, 2007 03:55 AM
Newbie XSLT question wasabi XSLT 2 March 8th, 2007 01:06 PM
PakageMaker & External scripts murraywj Xcode 1 May 12th, 2006 05:00 PM
Restore & Delete Scripts Walden SQL Server 2000 1 June 16th, 2003 06:10 PM





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