This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Xalan for SVG

 
Sudarsan Raman
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm trying to use xalan for SVG, things seems to go thru properly,
I get the SVG output but this SVG output comes as file download.
i.e. It comes with Open or Save buttons.
My xsl utput is something like this.
<xsl utput method="xml" omit-xml-declaration="no" media-type="image/svg+xml"/>
or (tried with both)
<xsl utput method="html" omit-xml-declaration="no" media-type="image/svg+xml"/>

Is that fine or I need to do add any other attributes ??
Is the problem described above because of the xsl utput??
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to tell the content type in the HTTP response as well in order to get the browser to recognize the content as SVG. How are you serving the SVG? If it's through a servlet performing the XSL transformation, you need to say HttpServletResponse.setContentType("image/svg+xml"). If you're doing the transformation offline and serving a static SVG file, you need to tell your web/app server that the MIME type for *.svg files is "image/svg+xml".
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic