|Anonymous | Login||2017-11-22 22:23 EST|
|Main | My View | View Issues | Change Log | Roadmap | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000020||graphviz||Dot||public||2002-03-24 00:00||2011-04-28 04:02|
|Summary||0000020: Problems with the SVG driver|
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:
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!
|Tags||No tags attached.|
|FIX-COMMENT|| <A HREF='b118_fix.txt'>Here</A>|
|STATUS-COMMENT||Fixed (25 March 2002)|
|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|