File talk:Seven Bridges of Königsberg - Abstraction Level 1.svg
Jump to navigation
Jump to search
Namespace prefix xlink for href on use is not defined
[edit]Clicking on the .svg prints the following error in Firefox (Mozilla/5.0 (X11; U; Linux; en-US; rv:1.0) Gecko/25250101):
XML Parsing Error: prefix not bound to a namespace Location: http://upload.wikimedia.org/wikipedia/commons/5/5e/Seven_Bridges_of_K%C3%B6nigsberg_-_Abstraction_Level_1.svg Line Number 20, Column 3: <use x="0" y="0" xlink:href="#bridge" transform="translate(120,0) rotate(110)"/> ----------------^
and in Google Chrome (5.0.307.5 dev) and in xmlwf (from expat 2.0.1):
error on line 20 at column 32: Namespace prefix xlink for href on use is not defined
Removing the xlink: prefix removes the error and still renders the image:
diff --git a/Seven_Bridges_of_Koenigsberg_-_Abstraction_Level_1.svg b/Seven_Bridges_of_Koenigsberg_-_Abstraction_Level_1.svg.edited
index 477bc02..c5a7be4 100644
--- a/Seven_Bridges_of_Koenigsberg_-_Abstraction_Level_1.svg
+++ b/Seven_Bridges_of_Koenigsberg_-_Abstraction_Level_1.svg.edited
@@ -17,12 +17,12 @@
<path d="M 205,43 C 171,105 264,89 305,73" style="stroke-width:10;"/>
</g>
<g id="bridges" transform="translate(0,15)">
- <use x="0" y="0" xlink:href="#bridge" transform="translate(120,0) rotate(110)"/>
- <use x="0" y="0" xlink:href="#bridge" transform="translate(160,0) rotate(110)"/>
- <use x="0" y="0" xlink:href="#bridge" transform="translate(220,0) rotate(70)"/>
- <use x="0" y="0" xlink:href="#bridge" transform="translate(97,48) rotate(110)"/>
- <use x="0" y="0" xlink:href="#bridge" transform="translate(130,48) rotate(110)"/>
- <use x="0" y="0" xlink:href="#bridge" transform="translate(210,25) rotate(10)"/>
- <use x="0" y="0" xlink:href="#bridge" transform="translate(224,87) rotate(120)"/>
+ <use x="0" y="0" href="#bridge" transform="translate(120,0) rotate(110)"/>
+ <use x="0" y="0" href="#bridge" transform="translate(160,0) rotate(110)"/>
+ <use x="0" y="0" href="#bridge" transform="translate(220,0) rotate(70)"/>
+ <use x="0" y="0" href="#bridge" transform="translate(97,48) rotate(110)"/>
+ <use x="0" y="0" href="#bridge" transform="translate(130,48) rotate(110)"/>
+ <use x="0" y="0" href="#bridge" transform="translate(210,25) rotate(10)"/>
+ <use x="0" y="0" href="#bridge" transform="translate(224,87) rotate(120)"/>
</g>
</svg>
-- Evilninja (talk) 03:25, 9 February 2010 (UTC)
- I see that the file has already been fixed properly, but as a future reference to anyone who comes across this page attempting to resolve their own similar problem, note that:
Removing the xlink: prefix removes the error and still renders the image
- is not the correct solution; the file may render, but it may not render properly, or as intended. A more appropriate solution would be to add the missing namespace definition for
xlink
into the<svg>
tag, so that:
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="115">
- now becomes:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="300" height="115">