• 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

How to show a xml as a svg in IE?

 
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
however, the fact is, i have installed the svg viewer from adobe. i don't know why.
 
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 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, mate. your documentation is so helpful.
reply
    Bookmark Topic Watch Topic
  • New Topic