[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Again-- How to switch stylesheet with "double-clic
>>>>> "David" == David Riggs <dariggs@xxxxxxxxxxxxxxx> writes: David> I got a reply to my last question, which I do not David> understand. "So you can do that with query parameters on David> the URI." David> So I repeat my question, with the additional note that this David> is all on a local computer, and I need to set up the user David> so he can simply open a file in a browser, and get one of David> several xslt sheets to provide one of several view of the David> same, unchanging xml data. David> It needs to be very simple! If the above reply about query David> parameters fits, I would appreciate a little explanation of David> what it means, in the specified environment. OK. In this environment, you need to code some Javascript to invoke the XSLT transformer. Let us suppose you choose a query parameter named style. Then the user must invoke a URL that ends with ?style=style1, for instance. In your Javascript, you then invoke the transformation corresponding to style1. Or you might choose to have two query parameters, named view and language (perhaps). Then the user calls a URL, say: http://my.host/my/master/page.html?language=german&view=tabular Then my/master/page.html would, after loading, invoke some javascript which would inspect these two query parameters, and invoke the appropriate stylesheet for a German tabular view. Or you might invoke the same stylesheet all the time, and pass it the two parameters. Or you might have one stylsheet for all tabular views, and pass it the language parameter. It's up to you how you want to structure it. -- Colin Adams Preston Lancashire
|
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
|