This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Html Report Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Html Report" Watch "Html Report" New topic
Author

Html Report

pradeep selvaraj
Ranch Hand

Joined: Nov 29, 2005
Posts: 62
Hi ,

I want to create html reports. This is what i am doing: writing all the required data into a xml file and then parse it with the xslt to produce html. This to produces one really big html page (with one xslt and one big xml file).
What should i do to get multiple html pages using? Creating a new xml file for each html page and then parsing it would be time consuming.Can i pass data directly to xslt from the java application?


Thanks


[<a href="http://cyvis.sourceforge.net" target="_blank" rel="nofollow">CyVis - Software Complexity Visualiser</a>] [<a href="http://pradeepselvaraj.blogspot.com" target="_blank" rel="nofollow">Pradeep's Blog</a>]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12760
    
    5
Can i pass data directly to xslt from the java application?

Sure, it is not necessary to create a disk file. Look at the various ways an org.xml.sax.InputSource can be created and the javax.xml.transform.sax.SAXSource class as used in Transformers.
Bill
pradeep selvaraj
Ranch Hand

Joined: Nov 29, 2005
Posts: 62
Hi, I am still confused (as to how to use the input source), was not able to find an example on how to generate html without xml files.
This is my code, it works fine, but i want to create the reports without using xml files.


Can it be done by implementing javax.xml.transform and then using setSystemId(String systemId) to set the data and then get this data in the xslt as a normal variable.
[ June 13, 2006: Message edited by: pradeep selvaraj ]
 
Consider Paul's rocket mass heater.
 
subject: Html Report
 
Similar Threads
xsl and xslt
Dynamic content in HTML Pages
XSLT question
HTML to XSLT and vice versa generation
Date Function to get System Date using XSLT