Subject: Re: [xsl] Again-- How to switch stylesheet with "double-click open" user local environment From: Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx> Date: 22 Oct 2005 06:58:19 +0100 |
>>>>> "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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Again-- How to switch stylesh, David Riggs | Thread | Re: [xsl] Again-- How to switch sty, António Mota |
[xsl] Again-- How to switch stylesh, David Riggs | Date | RE: [xsl] Count line number, Michael Kay |
Month |