473,732 Members | 2,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Caliing asp as xslt

Hi,

Is it possible to call an asp file that generates xslt using

Objectname.load ? I have tried this script :

<%

Dim objXML, objXSL

Set objXML = Server.CreateOb ject("Msxml2.DO MDocument.4.0")

Set objXSL = Server.CreateOb ject("Msxml2.DO MDocument.4.0")

objXML.async = False

objXSL.async = False

objXML.setPrope rty "ServerHTTPRequ est", true

objXML.load

("http://www.ourdomain.c om/sales/atdxmlfeed.asp? Ga_Id=" &

Request("Ga_Id" ) )

objXSL.setPrope rty "ServerHTTPRequ est", true

objXSL.load "http://www.ourdomain.c om/sales/stylesheet01.as p?Ga_Id=" &
Request("Ga_Id" ) ) **** this is the line with the problem....

objXML.transfor mNodeToObject objXSL, Response

%>

But when I run it on the browser, I get this error :

******

msxml4.dll error '80004005'

The stylesheet does not contain a document element. The stylesheet may be
empty, or it may not be a well-formed XML document.

********

When I change stylesheet01.as p to stylesheet01.xs l (stripping the asp out),
it works. The xml file (atdxmlfeed.asp ) works too, and I assumed that what
would be good for one, would be good for the other.

Thanks in advance for any advice received.

Justin Woodcock


Jul 20 '05 #1
1 3398
"Justin Woodcock" <jw************ *@waitrose.com> wrote in message news:<40******* *************** @reading.news.p ipex.net>...
Is it possible to call an asp file that generates xslt using
Objectname.load
That's trying to load XSLT, rather than generate it, but yes, it ought
to work.

XSLT is just XML. XML (in the right place) is just HTTP traffic. It
all inter-works quite cheerfully.

Dim objXML, objXSL
Don't use VBScript, use JScript. It's worth learning it, just for the
better error trapping.

objXML.async = False
Good. This is popular bug #1
objXML.load
("http://www.ourdomain.c om/sales/atdxmlfeed.asp? Ga_Id=" &
Request("Ga_Id" ) )
This line is ugly.

Don't assemble strings dynamically and use them immediately until
_after_ you've debugged it.

Grabbing random stuff out of Request.QuerySt ring() is tacky. There
could be anything in there - embedded SQL, redirects to other sites,
all sorts of nastiness.

Write yourself a nice tidy little parameter reading library and _USE_
it, even for hack-code written during prototyping (for we know how
this stuff becomes immortal).

If any of my code-bunnies use QueryString() in-line on a page, then I
break their fingers.

objXSL.load "http://www.ourdomain.c om/sales/stylesheet01.as p?Ga_Id=" &
Request("Ga_Id" ) ) **** this is the line with the problem....
Is it ?

But when I run it on the browser,
browser ?
******

msxml4.dll error '80004005'

The stylesheet does not contain a document element. The stylesheet may be
empty, or it may not be a well-formed XML document.

********


So what _does_ the stylesheet contain ? Did the .load() method
succeed or fail? If it did succeed, what did it manage to load ? Does
it look like a stylesheet?

If you answer this, I imagine you'll answer your own problem.
Then write a nice error-dump routine and call it every time you do a
..load() or similar. Show you the bad XML, and where it went bad.
I'm a furniture maker who also happens to write code. In one trade I
spent an hour a day just sharpening tools, then I do some good work. I
know that work with blunt tools will be a complete waste of effort, so
I don't do it. In the other trade I don't get to sharpen anything
because "There's no time! We have to write code now!". Funny
that....
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3905
by: ted | last post by:
Was wondering if XSLT alone is appropriate for the following situation. From XML, I'm creating a small website (around 50 pages) with pages that link to each other through a nav menu and a "crumb-trail" of links. I'm transforming the XML with XSLT through Saxon. The nav menu and "crumb-trail" show the user where they are within the site and is made by reflecting the XML tree structure. My problem now is that when I want to generate...
2
2793
by: Tom Corcoran | last post by:
I am working to ease updating of a html page by transforming 2 xml files. I was going to use xslt for this and had bought 2 unopened books, wrox xslt and o'reilly's xslt cookbook. But am now wondering if I am better of learning XQuery instead? Any thought and opinions would be appreciated. Cheers - Tom. The Architect: "Hope, it is the quintessential human delusion,
1
3603
by: Mohit | last post by:
Hi Friends I have to call 1 of the 2 child XSLT files from the Main XSLT file based on some criteria. I want one child XSLT file will be executed by version 1 of XSLT processor and the other by version 2 of XSLT processor based on some condition. Q) How and where shall I write logic or import desirable XSLT on the Fly ? Q) When we call AAA.XSLT then it will be processed by XSLT Processor 1
3
2261
by: Jack Fox | last post by:
I've never had the need to work with XML, but I believe I now have an appropriate application. I have time-series data in objects organized as a tree that I want an ASP.NET program to write out to web pages formatted as a matrix. It is not a simple matrix, since the number of row heading cells can vary, but the data cells must be aligned by date (so the heading cells will not be uniformly sized). example of typical rows: 3 heading...
3
2196
by: Teksure | last post by:
Hi group, searching in the Internet I found two products for XML which incorporate a very robust debugger for XSL/XSLT, I would like you to see these products and then, give me your opinion about the development environment or recommend me some other that you know. XML IDE's - http://xslt-process.sourceforge.net - http://www.mentattech.com/themes/mentat/alchemist/index.html Regards,
3
3092
by: Ian Roddis | last post by:
Hello, I want to embed SQL type queries within an XML data record. The XML looks something like this: <DISPLAYPAGE> <FIELD NAME="SERVER" TYPE="DROPDOWN"> <OPTION>1<OPTION> <OPTION>2<OPTION> <OPTION>3<OPTION> </FIELD>
1
2417
by: Sergey Dubinets | last post by:
In effort to prioritize our goals we composed the list of random features each of them may add value to set of XSLT tools offered from Microsoft. 1. XSLTc (Compiler for XSLT stylesheets, that generates .NET assemblies) 2. Performance improvements in the XslCompiledTransform
12
11599
by: Chris | last post by:
Hi, Just wondering if anyone out there knows if it is possible to convert a CSV to xml using XSLT? I've seen a lot of examples of xml to CSV, but is it possible to go back the other way? I don't want to have to use some external program or script to parse the csv first if possible
2
22775
jkmyoung
by: jkmyoung | last post by:
Here's a short list of useful xslt general tricks that aren't taught at w3schools. Attribute Value Template Official W3C explanation and example This is when you want to put dynamic values in the attribute of an element. Instead of using the <xsl:attribute> element, you can simply place the xpath in the attribute itself. The most common usage of this is in creating hyperlinks.
0
9445
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9234
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6733
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6030
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4548
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4805
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3259
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.