wood burning stoves*
The moose likes XML and Related Technologies and the fly likes Stream SVG using Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Stream SVG using Java" Watch "Stream SVG using Java" New topic
Author

Stream SVG using Java

Tamer Badr
Ranch Hand

Joined: Feb 18, 2004
Posts: 48
I designed an application that retrieves data from the database and transform it to XML, and then uses XSLT to transform it to XHTML to be viewed to the user.
The main html page have links to all other pages that designed to view data, these pages are JSPs, that just calls java classes, and define the properties file path to these classes, the properties file has all the queries and the XSLT files paths, the java classes uses the queries to generate stream XML, and then uses the XSLT file to generate the XHTML.
Now I want to make a project that reads a database and generate reports that include charts, I was thinking to use the same framework to generate the data, I want to know that if this design overview looks good, or somebody who was involved in such a project has better design.
Here is my design overview:
I'll add more methods to use the retrieved data (in XML format) to generate SVG files, that will be generated using new XSLT files, then it has to be saved and called from the XHTML.
I'm not embbeding the SVG markup inside the HTML, because browsers don't support that yet, if browsers support it, then I'd make the whole SVG inside the XHTML, the output has to be viewed on Internet Explorer, no other browsers can be used, I know that Amaya browser supports that, but I'm not allowed to use any other browser.
I can generate the XHTML from XML, all I want to do is to make generate SVG, then embed it in the output XHTML, so if you have any other design method please tell me, thank you...
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
You will probably get more help with this in our XML forum. I will move it there for you.


Matthew Phillips
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Originally posted by Tamer Badr:
I designed an application that retrieves data from the database and transform it to XML, and then uses XSLT to transform it to XHTML to be viewed to the user.

May be i don't understand your system properly, but why you want convert database to xml to xhtml instead of database to xhtml ?

Here is my design overview:
I'll add more methods to use the retrieved data (in XML format) to generate SVG files, that will be generated using new XSLT files, then it has to be saved and called from the XHTML.
I'm not embbeding the SVG markup inside the HTML, because browsers don't support that yet, if browsers support it, then I'd make the whole SVG inside the XHTML, the output has to be viewed on Internet Explorer, no other browsers can be used,
I can generate the XHTML from XML, all I want to do is to make generate SVG, then embed it in the output XHTML, so if you have any other design method please tell me, thank you...

Is not that any browser can use free plugins like Adobe SVG viewer to view SVG graphics ?? see here for more info. I guess you might be aware of Apache FOP which uses batik , JIMI etc., to geneate svg using xml and xslt. For generating bar charts, your idea sounds nice, but for generating xhtml i don't see the advantage of using xml in middle. may be i'm missing something ??


Spritle Software Blogs
Tamer Badr
Ranch Hand

Joined: Feb 18, 2004
Posts: 48
The idea about using XML is that the system requires that the output be ib html format now, but it may require any other output format in the future, so getting the data in XML will make it easy to transform it to any needed format.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Stream SVG using Java
 
Similar Threads
Are SAX and DOM Parsers or APIs???
Book Release Announcement - "Java and XSLT" - O'Reilly
SVG Components
xml mathml pdf FOP
New EDI Tools for XML Data Integration