Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to show a xml as a svg in IE?

 
Sean Li
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a strange question. yes it is.
I got a xml file contains the data, and a xsl file convert the data into svg graph. and it successfully done, I can see the result in develop tools such as Xselerator. a beautiful and simple svg graph.
however, how can I show it in IE? when I open this xml file with IE, it's just nothing. I think the IE just take the xml file as a xml file instead of a svg.
do you know what i mean? hope you can and hope can get help from you.
any reply is appreicated.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IE needs a plugin that knows how to handle documents with the SVG mime type -- otherwise it treats it as any XML.
I found these two from the W3C SVG Implementations page:
Corel SVG Viewer
Adobe SVG Viewer
 
Sean Li
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
however, the fact is, i have installed the svg viewer from adobe. i don't know why.
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sean Li:
however, the fact is, i have installed the svg viewer from adobe. i don't know why.

The adobe SVG viewer is only SVG image viewer, it will NOT convert the XML to SVG using XSL and display it on the screen.
For your case, it is better if u pre-generate the SVG using your 'processor' and show it using IE(which inturns uses SVG viewer plugin).
 
Sean Li
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so if I want to use xsl to convert xml to generate dynamic svg output, what can i do? I cannot just generate it by hand. help me. pls!
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have access to any server-side programming technologies?
 
Sean Li
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do you mean using Java? I know Java, but never used it to do such stuff. would you tell me how? thank you!
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java is one of many languages/environments able to perform XSL transformation (you could also do it with ASP, ASP.NET, PHP, CGI, what not).
Take a look at these references for how to do XSLT in Java:
http://www.oreillynet.com/pub/d/838
http://xml.apache.org/xalan-j/samples.html#servlet
http://www.xml.com/pub/rg/137
http://www.tutorgig.com/searchtgig.jsp?query=XSL+Java
If you'd prefer having a resource for offline learning, I can recommend Eric Burke's Java and XSLT.
 
Sean Li
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, mate. your documentation is so helpful.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic