Subject: RE: [xsl] Server-side transform with .asp file instead of .xml From: "Jacoby, Peter R." <PJACOBY@xxxxxxxxxxxx> Date: Tue, 16 Sep 2003 15:36:06 -0400 |
>>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: [xsl] 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Server-side transform wit, Jim Fuller | Thread | [xsl] Authority For Western Line Br, W. Eliot Kimber |
Re: [xsl] Noob: Wrap cell content a, Wendell Piez | Date | [xsl] Applying templates to a mixed, Ryan Graham |
Month |