cocoon-users mailing list archives

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

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 :



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


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

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



Here is a snippet from my sitemap :

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

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

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

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

Any ideas ?

Thanks in advance,

Rob Gregory

View raw message