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

XML allowing variable XSL application for browsers?

Subject: XML allowing variable XSL application for browsers?
From: John <john-xsl-list@xxxxxxxx>
Date: Wed, 20 Apr 2005 14:14:51 -0700
multiple xsl in xml
I have an XML file on a web server which references an XSL with code as follows:

<?xml-stylesheet type="text/xsl" href="somefile.xsl"?>

When IE or Firefox requests this XML file, the browser detects the stylesheet reference and applies it to the XML to transform it into HTML. This works great, but what if I want to let the user choose from multiple XSL files which can be applied to the same XML? My first thought was URL parameters (which I otherwise generally avoid), but I am not sure if there is any URL parameter that can override the stylesheet referenced in the XML file. I was then thinking multiple XML files that basically contain the XSL reference and an entity reference (keeping the XML in a separate file), or using document() in the XSL files to open the content XML, but I would prefer to avoid that if possible.

Does anyone have any recommendations, pros and cons of the various techniques?

Thanks & regards,

-John

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.