• 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

XSL style sheets

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have used XSL style sheets to tranform XML documents with no problems. I have been trying to think of ways to use the XML file itself to create the XSL style sheet. What I would like to be able to do is read the XML file, determine the schema, and create a temporary style sheet to transform the original XML file to CSV. Any ideas or pointers?

Thanks,
Eric
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Eric Gero:
What I would like to be able to do is read the XML file, determine the schema, and create a temporary style sheet to transform the original XML file to CSV. Any ideas or pointers?


For this conversion process, are you thinking about using XSLT or Java.?
 
Eric Gero
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was wanting to use the dynamically created stylesheet to do the transformation. I am new to XML. Maybe there is a better way to do this?
 
Balaji Loganathan
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From your questions, I can see options like...
1. Use XSLT to generate dynamic XSLT based on XMLSchema and XML configurations and then generate CSV.
2. Use Java to read XMLSchema and XML configurations and then generate CSV.

The first option is not easy to maintain and develop as reading XMLSchema details from XSLT is not easy made.
The second option is easy as their exist many XML Data bindings tools to read XMLSchema and generate desired outputs. Easy to understand and maintain.

Just is my view...
Let me know what you think.
Regards
Balaji
 
Farmers know to never drive a tractor near a honey locust tree. But a tiny ad is okay:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic