Skip Menu |

This queue is for tickets about the SVG CPAN distribution.

Report information
The Basics
Id: 43814
Status: resolved
Priority: 0/
Queue: SVG

People
Owner: Nobody in particular
Requestors: wieland [...] wielandpusch.de
Cc:
AdminCc:

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



Subject: inline SVG
Date: Tue, 3 Mar 2009 18:30:21 +0100
To: bug-SVG [...] rt.cpan.org
From: Wieland Pusch <wieland [...] wielandpusch.de>
Hello, in the docs there is written -in-line but in the code you use -inline. The last works almost for me. But -inline still produces a first line: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> How can I not get this? My code is: use strict; use warnings; use SVG('-inline' => 1); my $svg= SVG->new(width=>200,height=>200); # add a circle to the group $svg->circle(cx=>100, cy=>100, r=>50, id=>'circle_id'); print $svg->xmlify; The output is: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <svg height="200" width="200" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <circle cx="100" cy="100" id="circle_id" r="50" /><!-- Generated using the Perl SVG Module V2.49 by Ronan Oger Info: http://www.roitsystems.com/ --> </svg> Thanks Wieland Pusch mailto:wieland@wielandpusch.de
CC:
Subject: RE: [rt.cpan.org #43814] inline SVG
Date: Wed, 04 Mar 2009 11:28:43 GMT
To: <bug-SVG [...] rt.cpan.org>, <wieland [...] wielandpusch.de>
From: <ronan.oger [...] roitsystems.com>
You are right, this is a dumb bug on my part. I need to fix it. In the mean time, try this kluge: use strict; use warnings; use SVG('-inline' => 1); my $svg= SVG->new(width=>200,height=>200); # add a circle to the group $svg->circle(cx=>100, cy=>100, r=>50, id=>'circle_id'); print $svg->xmlify; output: <svg height="200" id="svg" width="200" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <circle cx="100" cy="100" id="circle_id" r="50" /> </svg> From: "Wieland Pusch via RT" <bug-SVG@rt.cpan.org> Date: 3/3/09 17:24Subject: [rt.cpan.org #43814] inline SVG Tue Mar 03 12:31:06 2009: Request 43814 was acted upon. Transaction: Ticket created by wieland@wielandpusch.de Queue: SVG Subject: inline SVG Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: wieland@wielandpusch.de Status: new Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=43814 > Hello, in the docs there is written -in-line but in the code you use -inline. The last works almost for me. But -inline still produces a first line: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> How can I not get this? My code is: use strict; use warnings; use SVG('-inline' => 1); my $svg= SVG->new(width=>200,height=>200); # add a circle to the group $svg->circle(cx=>100, cy=>100, r=>50, id=>'circle_id'); print $svg->xmlify; The output is: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <svg height="200" width="200" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <circle cx="100" cy="100" id="circle_id" r="50" /><!-- Generated using the Perl SVG Module V2.49 by Ronan Oger Info: http://www.roitsystems.com/ --> </svg> Thanks Wieland Pusch mailto:wieland@wielandpusch.de
Subject: Re[2]: [rt.cpan.org #43814] inline SVG
Date: Wed, 4 Mar 2009 15:18:19 +0100
To: "ronan.oger [...] roitsystems.com via RT" <bug-SVG [...] rt.cpan.org>
From: Wieland Pusch <wieland [...] wielandpusch.de>
Hello Ronan, your code looks same like mine. What did you change? Wednesday, March 4, 2009, 12:44:16 PM, you wrote: Show quoted text
rorcvR> In the mean time, try this kluge:
use strict; use warnings; use SVG('-inline' => 1); my $svg= SVG->new(width=>200,height=>200); # add a circle to the group $svg->circle(cx=>100, cy=>100, r=>50, id=>'circle_id'); print $svg->xmlify; I already have a workaround: my $tmp = $svg->xmlify; $tmp =~ s/^<\?xml .*?\?>\s*//sm; $html .= $tmp; I want to include the SVG in my HTML page. But embed is very slow, if the src is slow (a program that need a database connection ...): <embed src="rect.svg" width="300" height="100" type="image/svg+xml" pluginspage="http://www.adobe.com/svg/viewer/install/" /> see http://www.w3schools.com/svg/svg_inhtml.asp Now I use: import namespace="svg" implementation="#AdobeSVG" see Listing 10-11: Für den Adobe SVG Viewer optimierter (X)HTML-SVG-Mischcode http://www.selfsvg.info/?section=10.3 This works with IE6 and Adobe SVG Viewer. Yes very old. But anchors are not working :-( Maybe I will not use inline but create tempfiles, these can be loaded fast by embed. Thanks Wieland Pusch mailto:wieland@wielandpusch.de
Hi Wieland, I released a fix. This bug shouldn't be an issue anymore in version 2.50 of SVG. Florent