• 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

track progress of an xsl transformation?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
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 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!..
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
WARNING! Do not activate jet boots indoors or you will see a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic