[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Using ASP/IIS to dynamically process XML/XSL (was Re: how to
Subject: Using ASP/IIS to dynamically process XML/XSL (was Re: how to change
From: "Steven Livingstone" <ceo@xxxxxxxxx>
Date: Wed, 15 Sep 1999 04:35:00 +0100
|
You can also create completely dynamic XSL
files.
Add the XSL type to you MIME extensions in IIS and map it to the
asp.dll. Now you can write ASP directly *inside* your XSL.
You can
also do it for XML, but I don't really advise
this.
Cheers Steven
Steven Livingstone Glasgow,
Scotland. +44 7771 957 280
Author - Professional Site Server 3,
Wrox Press http://www.wrox.com/Store/Details.asp?Code=2696 Professional
Site Server 3.0 Commerce Edition, Wrox Press http://www.wrox.com/Store/Details.asp?Code=2505
President,
AIP Scotland. http://www.citix.com
Join Association of
Internet Professionals - http://www.citix.com/aip ----- Original
Message ----- From: Garriss Jr.,James P. <jgarriss@xxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxx> Sent:
Tuesday, September 14, 1999 1:57 PM Subject: Using ASP/IIS to dynamically
process XML/XSL (was Re: how to change xsl
dynamically?)
> > > > ---------- > > From:
Garriss Jr.,James P.[SMTP:JGARRISS@xxxxxxxxx] > >
Sent: Tuesday, September 14, 1999 1:57:17 PM > > To: xsl-list@xxxxxxxxxxxxxxxx >
> Subject: Using ASP/IIS to dynamically process XML/XSL (was Re: how
to change xsl dynamically?) > > Auto forwarded by a Rule >
> > At 04:04 PM 9/13/99 , Mark Stemp wrote: > >
>Please post some examples! > > Ok, here is a very simple
example. Please note that this requires ASP to > be running on an
IIS or PWS server. Only HTML is returned, so any client > web
browser can be used. Place both these files (match.htm and
sxml.asp) > in a directory on your Web server together with your XML and
XSL > files. Set permissions for script. Serve match.htm to
your browser. > > *** match.htm *** > > [HTML and BODY
tags deleted] > > <!-- pass the values by querystring to sxml.asp
--> > > <FORM method="get"
action=""> > > <!-- xmldoc* are the filenames of the
XML documents --> > > <SELECT name="xml"> >
<OPTION selected value="xmldoc1">XML Doc #1 > <OPTION
value="xmldoc2">XML Doc #1 > <OPTION value="xmldoc3">XML Doc
#1 > </SELECT> > > <!-- xsldoc* are the filenames of
the XSL stylesheets --> > > <SELECT name="xsl"> >
<OPTION selected value="xsldoc1">XSL Doc #1 > <OPTION
value="xsldoc2">XSL Doc #2 > <OPTION value="xsldoc3">XSL Doc
#3 > </SELECT> > > <INPUT type="submit" value="Match
XML with XSL"> > > </FORM> > > [HTML and BODY
tags deleted] > > *** sxml.asp *** > > [HTML and BODY
tags deleted] > > <!-- debugging starts here, can be deleted
--> > > The XML file is <% =Request.QueryString("xml")
%>. > <BR> > The XSL file is <%
=Request.QueryString("xsl") %>. >
<P><HR><P> > > <!-- debugging ends here
--> > > <% > ' Note that IE5 must be installed on the
server for this to work > > ' Load the XML document, appending .xml
to the filename > Set objXML =
Server.CreateObject("Microsoft.XMLDOM") > objXML.async = False >
objXML.Load(Server.MapPath(Request.QueryString("xml") + ".xml")) > If
objXML.parseError.errorcode <> 0 Then >
Response.write("<error/>") > End If > > ' Load the XSL
stylesheet, appending .xsl to the filename > Set domstyle =
Server.CreateObject("Microsoft.XMLDOM") > domstyle.async = False >
domStyle.Load(Server.MapPath(Request.QueryString("xsl") + ".xsl")) > If
domStyle.parseError.errorcode <> 0 Then >
Response.write("<error/>") > End If > > ' Dynamically
process the XSL against the XML > ' only HTML is returned, allowing any
web client to be used >
Response.Write(objXML.transformNode(domStyle)) > %> > >
[HTML and BODY tags deleted] > > James Garriss |
The MITRE Corporation | jgarriss @ mitre.org > > >
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list >
|
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|