This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes XSL style sheets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XSL style sheets" Watch "XSL style sheets" New topic
Author

XSL style sheets

Eric Gero
Ranch Hand

Joined: Jul 20, 2005
Posts: 73
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

Joined: Jul 13, 2001
Posts: 3150
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.?


Spritle Software Blogs
Eric Gero
Ranch Hand

Joined: Jul 20, 2005
Posts: 73
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

Joined: Jul 13, 2001
Posts: 3150
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XSL style sheets
 
Similar Threads
text in XML tag
Browser Back from one XSL to another
Error while displaying xml
Using XSL & XML within a JSP
Need help regarding <p>