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

Re: generating dynamic XSL to apply to a single XML do

Subject: Re: generating dynamic XSL to apply to a single XML document
From: S Woodside <sbwoodside@xxxxxxxxx>
Date: Wed, 10 Sep 2003 12:40:32 -0400
dynamic xsl
Instead you can read the form parameters in the xsl if you are using (say) libxslt and axkit. You just add an xsl:param with the same name as the form parameter and it will get the value filled in if it exists. then use xsl:choose or whatever conditional you prefer and do everything in one xslt stylesheet.

simon

On Wednesday, September 10, 2003, at 03:59 AM, Steven Bethard wrote:

I have a single XML document that contains the data. There are several
different views of this data that I need to display, and exactly what
goes into a view will be determined by some selections in an HTML form.
So my plan had been to incorporate a CGI script that would take the form
parameters, generate the appropriate XSL stylesheet, and format the XML
document using this stylesheet.


The only way I know to apply a different XSL stylesheet to the same XML
document is something like:
<?xml version="1.0"?>
<!DOCTYPE page [
<!ENTITY data SYSTEM "data.xml">
]>
<?xml-stylesheet type="text/xsl" href="style.xsl"?>
<page>
&data;
</page>
which (I believe) would mean I would have to save a file called
"style.xsl", and then have the CGI script return the above as xml data.

I'd rather not create a bunch of temporary files (for the "style.xsl"
files) if I can avoid it. Is there a better way to do this?

Steve


-- www.simonwoodside.com :: www.openict.net :: www.semacode.org 99% Devil, 1% Angel


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.