Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000020graphvizDotpublic2002-03-24 00:002011-04-28 04:02
ReporterNick Efthymiou 
Assigned Toellson 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOS*-*-*OS Version
Summary0000020: Problems with the SVG driver
Description



I ran into some trouble when trying to process the
sample graphs generated by the SVG driver used
in dot and neato. I used this tool:
http://www.jasc.com/products/webdraw/ [^]
and it refused to load some files (see attachment
"WebDraw-complaints" for details).



I then tested the output against the W3C DTD using
xmllint, my favourite xml "lint" program, and it pinpointed
two root causes:
1. Some graphs are really multigraphs, there are duplicate
edges. The SVG driver then assigns the same value to more
than one <g> element's id attribute. This causes programs
that rely on unique id's (such as webdraw) to fail.
(Note aside: the Adobe viewer doesn't rely on the id
and renders the output from dot just fine).



2. The value of the id attribute must be an SGML "ID",
which means the first character of the value can't be a
number. This violation of the validity constraint for ID,
see http://www.w3.org/TR/2000/REC-xml-20001006#id [^] ,
doesn't affect WebDraw, but it does mess up "XML Spy",
which is a very useful editor for XML content.



Anyway, attachment "PATCH_svggen" contains diff -c
output that can be applied to svggen.c and tries to fix
these 2 issues. My "unique-making" approach is "lame",
but works: I append a 4-digit random number to the ID.
To fix issue#2, I prefix svg strings that will be output as
values of an id attribute with an "N".



The patch also enables output for the DOCTYPE which
was #ifdef'd away. The new PUBLIC identifier and URI
seem to work (tested with the Adobe viewer and webdraw).



Thanks for the great tool!



TagsNo tags attached.
AUXILLARY-FILEShttp://www.graphviz.org/bugs/b118_fix.txt [^]
DATE-FIXED
FIX-COMMENT <A HREF='b118_fix.txt'>Here</A>
FORMER-ID118
INPUT-FILE
OUTPUT-FILEhttp://www.graphviz.org/bugs/b118.txt [^]
STATUS-COMMENTFixed (25 March 2002)
VERSION 1.8.2
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-04-28 04:02 user1 New Issue
2011-04-28 04:02 user1 Assigned To => user695


MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker