• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XSL style sheets

 
Eric Gero
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • 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
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • 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
  • 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
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic