Re: [xsl] Again-- How to switch stylesheet with "double-click open" user local environment

Subject: Re: [xsl] Again-- How to switch stylesheet with "double-click open" user local environment
From: António Mota <amsmota@xxxxxxxxx>
Date: Sat, 22 Oct 2005 20:20:30 +0100
Instead of uri parameter you can also have some kind of "properties"
file on the disk user and then define there the view (xslt) the client
will see.

If that was a client/server environemnet you could use cookies also.

On 22 Oct 2005 06:58:19 +0100, Colin Paul Adams
<colin@xxxxxxxxxxxxxxxxxx> wrote:
> >>>>> "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