File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes track progress of an xsl transformation? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "track progress of an xsl transformation?" Watch "track progress of an xsl transformation?" New topic
Author

track progress of an xsl transformation?

colin caufield
Greenhorn

Joined: Jan 12, 2003
Posts: 1
Hi everyone, this is my first post here.
I am currently working on an app that performs an xsl transformation (xml -> html). The transformation itself is very complicated and takes anywhere from 10 seconds to 1 minute, depending on the size of the original xml file. I would like to present the user with some progress information; perhaps a JProgressBar and some text. How can I acheive this? I've looked through the entire javax.xml package and have not found any classes/methods that support such tracking. I'm hoping I wont have to dig through the source of javax.xml and build my own subclasses.
Any ideas?
Thanks,
Colin
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Originally posted by colin caufield:
Hi everyone, this is my first post here.
I am currently working on an app that performs an xsl transformation (xml -> html). The transformation itself is very complicated and takes anywhere from 10 seconds to 1 minute, depending on the size of the original xml file. I would like to present the user with some progress information; perhaps a JProgressBar and some text. How can I acheive this? I've looked through the entire javax.xml package and have not found any classes/methods that support such tracking. I'm hoping I wont have to dig through the source of javax.xml and build my own subclasses.
Any ideas?
Thanks,
Colin

If I assume that your application is based on Swings, please post a question in swing , JFC forum, with a title "wait screen" , someone there may help you.
I guess!..
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi Colin,
I have never heard of any support for progress information in the transformation APIs, and I really doubt such thing could exist.
Anyway, there should be several ways to achieve this. One of them would be to split the complex transformation into small ones, to transform your original XML document in multiple passes.
I have done that in a previous project where transformation stylesheets were very complex. There are multiple poisitve side effects in doing this
1. The small transformations might become reusable for other types of XML feeds.
2. The XSLT code becomes easier to maintain
3. Because your small transformations are easier to understand, there is a better chance of optimisation.
To achieve ideal performance, you will have to stream the output of one transformation into the input of the next transform, by using SAXResult and SAXSource for instance if you're using TraX (Transformation API for XML = javax.xml.transform package).
Good luck
PS: Despite what Balaji says I think it is the right forum to ask your question. The way the progress information is displayed seems a secondary.
 
wood burning stoves
 
subject: track progress of an xsl transformation?
 
Similar Threads
one html page having data from multiple xmls
Layout framework design
easy way to view transformations
How to implement XML in Web App
Opening connections to www.w3.org