[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

Subject: Re: 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
masterpage stylesheet
>>>>> "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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.