[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Changing stylesheets though links
Daniel,
At 05:08 PM 1/31/2005, you wrote: I'm looking for a method of changing stylesheets via links. The goal would be to allow users to resort the same data according to different keys (e.g. by choosing "resort date" "resort name" etc.). In each case, the same xml would load, only the stylesheet would change. If there is another method of doing this, I'm not wedded to this approach. If operating server-side is okay, The Sonneteer (http://sonneteer.xmlshoestring.com) demonstrates this kind of thing both in its directory sorting, and in the various layouts it provides the sonnets in the collection. (Actually the directory sorting is even fancier, since the directory itself is constructed on the fly from whatever is there, and then a stylesheet parameter sets the sort order and the templates used for the particular sort. It's also the only extensible library of poetry I've seen that sorts by rhyme scheme. :-) It's all configured by mapping URIs to call the engine with the stylesheet given different runtime parameters. If operating on the client, you'll need scripting. You might check out Sarissa (http://sarissa.sf.net) to see what kind of support it provides for this kind of thing. The bottom line is that XSLT itself doesn't provide any framework for event-driven parameterization: you have to rely on the framework technology. (The Sonneteer uses the 4Suite engine but Apache Cocoon is capable of the same, as are others.) Another option that may be even better is to use Javascript to provide the re-sorting, on the next layer up from the XSLT. The html your stylesheet would generate would simply contain the code to achieve the sorting; these days sorting can be done with DOM scripting, so it should be fairly portable across current browsers. Mail me off list if you need to know more, and I'll see what I can do. Cheers, Wendell ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
|
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
|