LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-10-2012, 02:10 PM   #1
mzh
Member
 
Registered: Apr 2011
Location: Copenhagen
Posts: 71

Rep: Reputation: 0
Error in MIME type-- can't display SVG figure


Dear Forum
I worked on some webapp on Mac OS X and now transfered it to a Linux server. At one point, some mathematical function is evaluated and a resulting graph is generated using GNUPlot in SVG format. The app is started by Apache. However, the Mac and Linux Apache lead to slightly different SVG's. Only the Mac SVG displays in the browser, the SVG from Linux does not display in the browser. Here are the headers of both SVG files, I believe it's what controls this behavior.
Mac SVG:
Code:
<?xml version="1.0" encoding="utf-8"  standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="600" height="480" viewBox="0 0 600 480"
 xmlns="http://www.w3.org/2000/svg"
 xmlns:xlink="http://www.w3.org/1999/xlink">
<desc>Produced by GNUPLOT 4.2 patchlevel 5  </desc>

<defs>

	<circle id='gpDot' r='0.5' stroke-width='0.5'/>
	<path id='gpPt0' stroke-width='0.222' stroke='currentColor' d='M-1,0 h2 M0,-1 v2'/>
	<path id='gpPt1' stroke-width='0.222' stroke='currentColor' d='M-1,-1 L1,1 M1,-1 L-1,1'/>
	<path id='gpPt2' stroke-width='0.222' stroke='currentColor' d='M-1,0 L1,0 M0,-1 L0,1 M-1,-1 L1,1 M-1,1 L1,-1'/>
	<rect id='gpPt3' stroke-width='0.222' stroke='currentColor' x='-1' y='-1' width='2' height='2'/>
...
And Linux SVG:
Code:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN" "svg-20001102.dtd">
<svg width="600" height="480" viewBox="0 0 600 480"
 xmlns:xlink="http://www.w3.org/1999/xlink">
<desc>Produced by GNUPLOT 4.0 patchlevel 0 </desc>

<defs>


	<circle id='gpDot' r='1'/>
	<path id='gpPt0' style='stroke-width:0.222' d='M-1,0 h2 M0,-1 v2'/>
	<path id='gpPt1' style='stroke-width:0.222' d='M-1,-1 L1,1 M1,-1 L-1,1'/>
	<path id='gpPt2' style='stroke-width:0.222' d='M-1,0 L1,0 M0,-1 L0,1 M-1,-1 L1,1 M-1,1 L1,-1'/>

	<rect id='gpPt3' style='stroke-width:0.222' x='-1' y='-1' width='2' height='2'/>
...
Is this encoding attribute the reason why it does not display? How do I get Apache under Linux to print this attribute into the SVG file?

Thanks for any hints.
 
Old 01-11-2012, 12:57 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
You can test this by editing a copy of the file and adding it. Unless your svg file has UTF-8 characters in it, it won't make a difference. I tried both your xml version lines on an svg file on my system and both displayed fine in FF8. What browser are you using? Very old ones don't support svg.
 
Old 01-12-2012, 02:30 AM   #3
mzh
Member
 
Registered: Apr 2011
Location: Copenhagen
Posts: 71

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by smallpond View Post
You can test this by editing a copy of the file and adding it. Unless your svg file has UTF-8 characters in it, it won't make a difference. I tried both your xml version lines on an svg file on my system and both displayed fine in FF8. What browser are you using? Very old ones don't support svg.
Thanks, I was using Firefox as well. I'll be looking at your suggestion.
 
Old 01-12-2012, 08:59 AM   #4
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Also, could be some other reason it doesn't display. Test the svg directly using "Open File" menu and have the error console up in Tools -> Web Developer.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Mime type error opening dolphin and other kde 4.4 applications ginoboy Slackware 2 05-03-2012 09:04 AM
Could not find mime type application/octet-stream ERROR CyberDoc Mandriva 10 10-17-2005 08:18 PM
mime type error with k3b linuxmandrake Debian 1 09-30-2005 08:49 AM
MIME type error... Konqueror crashes. seiyachan Mandriva 1 06-09-2005 12:50 PM
mime type/ocet stream error ?? mnchur Linux - Software 3 02-25-2004 09:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration