Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML to SVG transformation problem in IE

Status
Not open for further replies.

aliinal

Technical User
Jun 26, 2001
104
TR
Hi,

I have an xml document and an xsl doc for transforming source xml into svg xml.
XSL document is correct. When i transform using saxon or .NET's built in transform methods, it produces correct svg file and explorer displays it without any problem.

But when source xml file opened directly from internet explorer (xml file has required referencing lines for xsl document), it does not show it as svg image. Page is pure white.
I think explorer doesn't trigger svg plugin. She tries to parse xml file itself.

In conclusion i want ie to transform my xml file into svg using my xsl file. I do not want to add any xslt processor to this process.

is there a solution for this? If important i'm using Adobe's SVG Viewer.

thanks
@li
 
I had the same problem. Here's the issue, you cannot put inline SVG directly into the browser. You need to have an embed tag that tells the browser that you want to send the data to the SVG plug-in.

Something like this:
<embed type="image/svg+xml" height="100" width="100" src="image.svg">

Seems pretty hopeless, but you can cheat. Instead of setting the source to an SVG file, set it to an ASP file that does the transform and sets the response.contenttype = "image/svg+xml"

Just make the output from the ASP the SVG code you want to put into the image.

Good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top