[Catalyst] Re: Catalyst, Firefox and SVG
Maurice Height
mauriceh at bigpond.net.au
Mon Dec 12 16:53:08 CET 2005
Thanks for all your suggestions regarding displaying SVG content via
Catalyst in Firefox v1.5
I now have it working but I am not sure why!
I re-installed perl (Activestate 5.8.7 build 815) because when I upgraded
some modules via CPAN it caused an error in Catalyst at the line:
use List::More::Util;
Whatever the cause was, the following file formats now work:
Template File: svg.tt
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Language" content="en" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SVG Test</title>
</head>
<body>
<h3>[% heading %]</h3>
<embed src="src/temp/circle.svg" width="400" height="600"
type="image/svg+xml" />
<p><a href="http://localhost:3000"><b>Home</b></a></p>
</body>
</html>
The SVG file: circle.svg
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg height="600" width="400" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<circle cx="100" cy="100" r="75" />
<circle cx="50" cy="200" r="0.5" style="fill: rgb(39,44,231)" />
<circle cx="70" cy="200" r="1" style="fill: rgb(39,44,231)" />
<circle cx="90" cy="200" r="1.5" style="fill: rgb(39,44,231)" />
<circle cx="110" cy="200" r="2" style="fill: rgb(39,44,231)" />
<circle cx="130" cy="200" r="3" style="fill: rgb(39,44,231)" />
<circle cx="150" cy="200" r="4" style="fill: rgb(39,44,231)" />
<circle cx="170" cy="200" r="8" style="fill: rgb(39,44,231)" />
<circle cx="100" cy="300" r="75" style="fill: red; stroke: #00ff00;
stroke-width: 6" />
<circle cx="100" cy="400" r="75" style="fill: yellow; fill-opacity: 0.5;
stroke: #00ff00; stroke-width: 6" /><!--
Generated using the Perl SVG Module V2.33
by Ronan Oger
Info: http://www.roasp.com/
-->
</svg>
Many thanks
Maurice
More information about the Catalyst
mailing list