xsl-list
[Top] [All Lists]

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

2005-10-22 12:20:30
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(_at_)colina(_dot_)demon(_dot_)co(_dot_)uk> wrote:
"David" == David Riggs <dariggs(_at_)humnet(_dot_)ucla(_dot_)edu> 
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>