[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: hard problem
In message <000001c3e8f7$9575b030$75827ad5@mustang>, Jim Fuller
<jim.fuller@xxxxxxxxxxxxxx> writes
[answer below] I have a web application which fetches museum records from a database as XML and styles them on the fly. For an initial overview of hits, I want to render a set of these records as a summary list with clickable links to each record. When the client clicks on one of these links, I want to display one of these records in detail. Exactly the same XML, two different renderings. At present I am having to use "modes" to achieve the desired effect, and I'm not even thinking about other different renderings that users might quite reasonably ask for. This extension function would be just the ticket. Possibly, though that would complicate what is currently a fairly clean design. Essentially a single XML document encapsulates the complete site, and a single XSLT transformation generates any required page. The only trickery involved is passing the HTTP request parameters (i.e. state information) to the process. I do this within an ASP by updating the DOM representing the source document before styling it: other approaches, including Cocoon, would do as well. Initially I had a bunch of JScript within my ASP which dealt with subsidiary calls for XML data from the database. This had the advantage that I could also apply a subsidiary XSLT transformation to the XML and return the transformed result: exactly the functionality we are discussing here. It had the disadvantage that subsidiary HTTP requests don't work under all IIS/Windows combinations - and anyway, I feel in my bones that doing it all within XSLT is much more hygienic. Richard Even deploying SAXON as a servlet will let you do something like a GET URL http://www.example.com?xml=somexmlfile.xml&xslt=somexsltfile.xslt Though I have not done this, though I have worked quite a bit with Cocoon, AxKit with great effect. Though I would suspect that even server side MSXML could be set up to provide a bit more abstraction, instead of trying to force xslt to do it all.
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
|