• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Query regarding XML/XSL

 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rancher,

I have following query regarding XML/XSL.

We have:

1 large xml document that contains all the info we will ever need.

5 different XSLs that cater for different pieces of information we may extract/filter from the above xml (xsl1 corresponds to filter1 ... xsl5 corresponds to filter5).

The xml document uses xsl1 as default. Everytime we want to see a different piece of information, we change the xsl.

Can anyone suggest an efficient way of achieving this without changing the xsl within the xml document?

i.e. can we conditionally specify the use of a particular xsl?

Please note that the xml and xsl are not residing on any web server � so a form that does a get/post http requests is ruled out. You can use form or any form controls (radio buttons, drop down, buttons etc).

Kind Regards
Naveen K Garg
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I maybe over-simplifying your problem in my mind otherwise -

I would write a MasterXSL that takes in a parameter and then uses the xsl:if construct to include the other XSL files. Better yet, create a "starting point" which takes a param and then calls the appropriate template.

Based on the info provided, my gut says this is an approach I would take.

- m
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic