Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stream SVG using Java

 
Tamer Badr
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will probably get more help with this in our XML forum. I will move it there for you.
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ??
 
Tamer Badr
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic