tags:

views:

52

answers:

1

I want to generate a report from an xml, preferably html. The html here should be dynamic to allow limiting the view based on some user entered values, preferably selecting from a drop down of categories, which inturn is populated from the xml. I also want to have links in the report to more info which is stored in another xml file.

I started off with javascript with xslt for display and I'm still long way in acheiving my desires. Are there any other ways to do it?? Any automated Open sources tools, for this, rather than reinventing.

+1  A: 

I'm a rank beginner with XLST, but I think it's the way to go. I would dynamically create an XML document containing which contains the bas document for the report, the user-entered information and the links to the other report, and from there, it should be just a matter of generating HTML using XLST. Not trivial, but once you have everything in one XML document, the HTML report becomes a simple mapping of the XML inputs.

James McLeod
I'm not making it a single document. Can you explain me that part a bit, so that I can try that.
Vignesh
I got ur idea. Thank you :)
Vignesh
Okay, so I'm assuming you are working with tools which permit you to manipulate XML somehow, either by creating temporary files or by adjusting DOM trees somewhere.Given an XML node REPORT_DATA, another for USER_DATA, and a third for LINKS, I'd synthesize a new parent node with each of these as a child, and then apply XLST to create the HTML output.
James McLeod
No, I don see requirements for such tools. My xml data is delivered by an web-app as output. Though I have access to the webapp. While my user views the reports and adds constraints, the web app will stop.I want to generate a report just using the XSL, Javascript. No other app. This is nasty constraint but XSLT allows extensions and I'm trying to use some pre-built extenstions from Xalan project. Does it sound good?? I think I'm Wasting time on something that should be easier
Vignesh
That's too bad. I'm surprised to hear that a language which offers the ability to use XLST does not allow one to create a new XML object in memory.Unfortunately, I think any other type of solution is an uphill battle.
James McLeod
XSL allows variables, I'm using that to populate my HTML lists and using java script for processing, and div tags for seperating and displaying results. Works like a charm! :)
Vignesh