Skip Menu |

This queue is for tickets about the Graph-Easy-As_svg CPAN distribution.

Report information
The Basics
Id: 67697
Status: new
Priority: 0/
Queue: Graph-Easy-As_svg

People
Owner: Nobody in particular
Requestors: RENEEB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.23
Fixed in: (no value)



Subject: Invalid ids in SVG
Hi! Thanks for your module. Unfortunately it generates invalid ids for elements. If you look at the source of the attached svg, you'll see several '<g id="#"...' where # is a single digit. This is not allowed (see http://www.w3.org/TR/2006/REC-xml11-20060816/#sec-attribute-types ). These invalid ids lead to problems when I want to reuse the SVG. Attached is a small script that generates the given SVG. Cheers, Renée
Subject: easy.svg
Download easy.svg
image/svg+xml 3.5k
easy.svg
Subject: graph_easy.pl
#!/usr/bin/perl use strict; use warnings; use Graph::Easy; my %dialog = ( start => [ qw/software schulung/ ], software => [qw/referenzen kompetenz/], referenzen => [qw/start/], ); my $graph = Graph::Easy->new; for my $page ( keys %dialog ) { for my $next ( @{ $dialog{$page} } ) { $graph->add_edge( $page, $next ); } } if ( open my $out, '>', 'easy.svg' ) { print $out $graph->as_svg({ standalone => 1, }); }