Last modified: 2011-03-14 20:20:29 UTC
I think the file is perfectly valid, yet I'm unable to upload it. (I'm not 100% about it's licensing so it might not belong to Commons but that's not the issue here, this seems like a bug.)
Yes, this seems like a bug. I permanently get this error too with a hand written svg file containing valid svg code as checked by the w3c validator as well as by Jarry1250's SVG Check. I found similar questions at Commons:Help desk/Archive but no solution. I studied a dozen of Bugzilla's threads, removed the <Title> tag and have no nested <g> (Bug 4388).
Can somebody at WMF run MimeMagic::singleton()->guessMimeType() on that file?
Here is the 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 version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 500" width="100%" height="100%" > <defs> <marker id="Arrow" viewBox="0 0 5 4" refX="3" refY="2" markerWidth="5" markerHeight="4" orient="auto"> <path d="M1 2L0 0L5 2L0 4z" /> </marker> <linearGradient id="Gradient" gradientUnits="userSpaceOnUse" x1="0" y1="0" x2="800" y2="0"> <stop offset="0" stop-color="white" stop-opacity="0" /> <stop offset=".06" stop-color="white" stop-opacity="0" /> <stop offset=".09" stop-color="white" stop-opacity="1" /> <stop offset=".94" stop-color="white" stop-opacity="1" /> <stop offset=".97" stop-color="white" stop-opacity="0" /> <stop offset="1" stop-color="white" stop-opacity="0" /> </linearGradient> <mask id="Mask" maskUnits="userSpaceOnUse" x="0" y="0" width="800" height="500"> <rect x="0" y="0" width="800" height="500" fill="url(#Gradient)" /> </mask> <symbol id="trace"> <path fill="none" stroke-width="4" d="M-50 260L100 400L400 120L700 400L1000 120"/> </symbol> </defs> <path d="M40 466V 20" stroke="black" stroke-width="3" marker-end="url(#Arrow)" stroke-linecap="square" /> <path d="M40 466H780" stroke="black" stroke-width="3" marker-end="url(#Arrow)" /> <text x= "15" y= "60" style="font-size:24px">f</text> <text x="740" y="490" style="font-size:24px">t</text> <g mask="url(#Mask)" > <use stroke="#aaf" xlink:href="#trace" x="-10" y=" 0" /> <use stroke="#ddd" xlink:href="#trace" x=" 50" y=" 0" /> <use stroke="#faa" xlink:href="#trace" x=" 50" y="-80" /> </g> <path d="M 50 420h 36" stroke="black" stroke-width="2" marker-end="url(#Arrow)" /> <path d="M190 420h-36" stroke="black" stroke-width="2" marker-end="url(#Arrow)" /> <text x="120" y="420" text-anchor="middle" baseline-shift="-30%" style="font-size:24px">Δt</text> <path d="M320 120h145" stroke="black" stroke-width="2" /> <path d="M320 40h145" stroke="black" stroke-width="2" /> <text x="320" y="80" baseline-shift="-30%" style="font-size:24px">Δf<tspan style="baseline-shift:sub;font-size:0.85em">D</tspan></text> <path d="M250 190v33" stroke="black" stroke-width="2" marker-end="url(#Arrow)" /> <path d="M250 287v-33" stroke="black" stroke-width="2" marker-end="url(#Arrow)" /> <text x="180" y="210" style="font-size:24px">Δf<tspan style="baseline-shift:sub;font-size:0.85em">auf</tspan></text> <path d="M550 96v33" stroke="black" stroke-width="2" marker-end="url(#Arrow)" /> <path d="M550 306v-33" stroke="black" stroke-width="2" marker-end="url(#Arrow)" /> <text x="535" y="200" style="font-size:24px">Δf<tspan style="baseline-shift:sub;font-size:0.85em">ab</tspan></text> </svg>
Just tried the file in comment #0 and that one is actually uploading without any problems.
Closing WORKSFORME for comment #0 Comment #3 hits bug 27544; the file is actually not valid XML; if I load it with Firefox it gives "XML Parsing Error: prefix not bound to a namespace"
Thank you for the hint at the namespace; xlink was missing. Thank you for the hint at bug 27544; I reopened it for the mere reason to urge the developers to make the error messages more informative.