[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Server-side transform with .asp file instead of .x

Subject: RE: Server-side transform with .asp file instead of .xml
From: "Jacoby, Peter R." <PJACOBY@xxxxxxxxxxxx>
Date: Tue, 16 Sep 2003 15:36:06 -0400
asp transform
>>Can anyone suggest how I can get it to recognise the XML code in an ASP
page? 

I think what you are looking for is how to send back XML and have the
browser interpret that as XML.  The way to control what type of data the
browser thinks it's getting is by setting the Content-Type of the HTTP
response.

In ASP, you would write

Response.ContentType = "text/xml"
Response.Write(xml.transformNode(xsl))

Hope this helps.

-Peter


-----Original Message-----
From: Noelle [mailto:ng302@xxxxxxxxxxx]
Sent: Monday, September 15, 2003 7:00 PM
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Server-side transform with .asp file instead of .xml 


Hi,

This may be a little out of scope for this list, but I thought it didn't
hurt to ask.  Please point me elsewhere if it is.

I've been using ASP to write my XML files for use on the web (using XSLT to
transform them to xhtml) and I need to be able to perform a server-side
transform in some cases. It worked just fine when I tested it with a static
XML document (i.e. with the .xml extension), but I need to transform the XML
that the ASP file is producing.

This is what I've been using as a base for the transform code:

<%
set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = false
xml.load(Server.MapPath("main.xml"))

set xsl = Server.CreateObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load(Server.MapPath("main.xsl"))

Response.Write(xml.transformNode(xsl))
%>

However, I need it to be able to access "main.asp" and transform the XML
created there instead of using a static "main.xml" file. Can anyone suggest
how I can get it to recognise the XML code in an ASP page?  I had intended
to use the above code in the "main.asp" file that was creating the XML.

If any further snippets of code or clarification of what I'm asking (or
doing) is needed, please just say so.

Thanks, I appreciate the help.
-Noelle



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.