cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "rob" <robert.grego...@btinternet.com>
Subject weird svg problem
Date Thu, 19 Jun 2003 18:43:51 GMT
Hi,

I have a really strange problem when using svg inside the <object> tag.

When I don't use cocoon to serve the following page everything is fine and I get
an alert, but when cocoon serves the page the javascript fails at getSVGDocument
(or getSvgDocument).

Here is my simple html page :

<html>

<head>
 <script>

  function initSvg(id) {
   var svg = document.getElementById(id);
   var svgDoc = svg.getSVGDocument();
   alert(svgDoc);
  }

 </script>
</head>

<body onload="initSvg('svg1')">

 <object type="image/svg+xml" id="svg1" 
  data="test.svgz"
  width="100%" height="100%">
 </object>

</body>

</html>

Here is a snippet from my sitemap :

   <map:match pattern="*.htm">
    <map:read src="{1}.htm" mime-type="text/html"/>
   </map:match>

   <map:match pattern="*.svgz">
    <map:read src="{1}.svgz" mime-type="image/svg+xml"/>
   </map:match>

This problem does not occurr when I use the <embed> tag - but I prefer
to use <object> so that I can display a jpeg if the SVG plugin is not
installed.

I have tried using cocoon 2.04 and 2.1m2 with the same results.

Any ideas ?

Thanks in advance,

Rob Gregory

Mime
View raw message