• 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

Is there an automated way of creating XSL file?

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to create XSL files based on a given HTML and XML. Is there an automated way of doing this instead of manually creating the .XSL file?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What exactly is the problem? An XSL document is in XML format so you can create or modify one with all the XML tools. You don't even have to write it as a file - look at all the ways you can create a javax.xml.transform.Source
Bill
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Personally, my answer to this question -

No, you can't create a style sheet automatically. A style sheet is written to convert a given input to an output that is known prior to writing the style sheet. If either the input or the output changes, the style sheet requires appropriate changes.

This is a very conservative answer, I agree but I get this question a lot and I have come across people who want 'some magic' to happen when the input is changed. Based on my experience and based on the (magical) expectations of various projects I have handled, I am constrained to answer this question in a conservative manner (in a hope that it will serve the cause of shutting the door on 'magic' in technical discussion).

I am not talking about tools that could potentially write style sheets, based on input/output. I don't know of any that do that.
Thanks.

- m
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic