Number: 54
Title: SVG does not include Namespace declaration for xlink elements
Submitter: Arthur Barstow
Date: Thu Oct 18 15:58:26 2001
Subsys: Neato
Version: 1.7.7
System: *-*-
Severity: major
Problem:
When dotneato creates a SVG file, the file may include xlink attributes such as:

<a xlink:href="http://purl.org/dc/elements/1.1/title">

but the SVG does not contain a namespace declaration for xlink. The missing declaration may cause an XML parser to throw an error.

In the 1.7.7 release, dotneato/common/svggen.c has some code to insert xlink's namespace declaration in the SVG but that code is only done if TESTFAILED is defined.

One possible solution is to add the xlink namespace declaration to the root SVG element. That is:

<svg width="442pt" height="126pt" >

would become:

<svg xmlns:xlink="http://www.w3.org/1999/xlink" width="442pt" height="126pt" >

Art Barstow barstow@w3.org ---
Fix:
In dotneato/common/svggen.c::begin_page(), change:


 fprintf(Outfile,"<svg width="%dpx" height="%dpx"",
to:

 fprintf(Outfile,"<svg xmlns:xlink="http://www.w3.org/1999/xlink"
                 width="%dpx" height="%dpx"",

Owner: ellson
Status: Fixed