xsl-list
[Top] [All Lists]

Re: apply 2 diff xsl on the same xml OR passing parameter to xsl

2004-12-07 03:05:40
Dear David,
I want to thank you for your detailed answers and for referring to each of my questions.
I really appreciate it.

I don't think I understood your first answer (I'll be thankful if you'll be more specific).
With your permission I want to clear-up my problem:

I've XML report-files on the disk. I need to display these xml-files in 2 ways (detailed and summarized, which is done by XSL). the only different between these 2 displays is that in the summarized I don't apply certain template.

I've an html 'index' file which is used to organized these xml-report-files as links.

the only tools I can used is the web-browser, XML, and XSL. I'm not allowed to write any other program.

I don't have any server-side, just local files on the disk.

I've attached an example

the only diff between 'report.xsl' and 'short_report.xsl' lies in line 22

best regards

From: David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] apply 2 diff xsl on the same xml OR passing parameter to xsl
Date: Mon, 6 Dec 2004 16:50:46 GMT

1. Is there a way to pass a parameter to the XSL file through the xml URL ? (this way I'll have one xsl file and according to the parameter value I'll
  display only what I need)


Not directly, no, you would need the xml file to use the xml-stylesheet
PI to apply a stylesheet that generated some html, and then use
javascript in that html to access the URI and  do anything else needed.

2. Is there a way, which is not browser depended, to apply the needed XSL on
  the xml file ?
(meaning I've 2 XSL file for 'detailed' version and 'summarized' version)

such javascript is likely to be browser dependendent although there are
some javascrip libraries available that hide the dependencies as much as possible.

3. I didn't quite understand, is XSL processor a built-in in all web-browser
  ? are there platform or web-browsers that don't suppot XSL processor and
  additional program should be installed on it ?

Lots of browsers don't have XSLT.
IE 6 and mozilla (which includes, netscape 7 and firefox, etc) do have
XSLT support, but Opera doesnt. KHTML browsers such as safari on the mac
don't IE on the Mac doesn't, lynx doesn't,....

4. how can it be the IE6 and netscape fail to open 10M xml file but when I'm
  adding to this file an XSL stylesheet it take no longer the 10sec ?

The default stylesheet in both cases makes a javascript enabled folding
tree view of the document, presumably it was taking a long time
for that tree view to be generated/rendered.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

--~------------------------------------------------------------------
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>
--~--


_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


--~------------------------------------------------------------------
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>
--~--