xlink:href replaced by href in gradient defs
Bug #436569 reported by
jazzynico
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Scour |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Tested on Ubuntu 9.04 and Windows XP, Scour rev. 146.
xlink:href attributes in gradient defs are replaced by href attributes in the optimized file.
Example from the attached file:
Original.
<linearGradient y2="0.91666669" x2="0.51618570" y1="0.16666391" x1="0.51618570" id="linearGradi
Optimized
<linearGradient id="linearGradi
I've tried each command line option (and combinations) with no success.
Strangely, Inkscape is not affected if I use Save As>Optimized SVG with the same Scour files as extension.
Really weird, isn't it?
Changed in scour: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Ok, I finally reduced the input file to the bare minimum to cause the problem. The issue seems to be because the actual SVG file is not valid - there are multiple gradients defined with the same ID.
<?xml version="1.0" encoding="utf-8"?> www.w3. org/2000/ svg" xmlns:xlink="http:// www.w3. org/1999/ xlink" width="256pt" height= "3170.0000pt" >
<svg xmlns="http://
<defs> ent841" > stop-color: #0082ab; stop-opacity: 1;"/> stop-color: white;stop- opacity: 0;"/> dient> ent1657" xlink:href= "#linearGradien t841"/>
<linearGradient id="linearGradi
<stop id="stop842" offset="0.00000000" style="
<stop id="stop843" offset="1" style="
</linearGra
<linearGradient y2="0.91666669" x2="0.51618570" y1="0.16666391" x1="0.51618570" id="linearGradi
</defs>
<rect height="69.247704" width="319.89233" fill="url( #linearGradient 1657)"/ >
<defs> ent841" > stop-color: #0082ab; stop-opacity: 1;" offset="0.00000000" id="stop842"/> stop-color: white;stop- opacity: 0;" offset="1" id="stop843"/> dient> "#linearGradien t841" id="linearGradi ent2465" x1="76.846634" y1="-7656.4473" x2="76.846633" y2="-7528.6605" gradientTransfo rm="matrix( 2.149642, 0.000000, 0.000000, 0.465194, -0.130153, 3495.428) " gradientUnits= "userSpaceOnUse "/>
<linearGradient id="linearGradi
<stop style="
<stop style="
</linearGra
<linearGradient xlink:href=
</defs>
<rect fill="url( #linearGradient 2465)" width="319.99103" height= "69.247704" />
</svg>
Note that these gradient elements are _identical_. This is probably an artifact from pulling it from DocBook XML?
I will continue to investigate this from the scour side and see if I can work around it. But if you remove the duplicate gradients I think the problem should go away.