I'm experimenting with SVG using Cocoon. Things work fine, until I 
attempt to utilize the <use> element, at which point I get an 
inexplicable error. Here's the set up:

Sitemap fragment:
---------------------------------
<map:pipelines>
 <map:pipeline>
  <map:match pattern="svg1.xml">
     <map:generate src="svg1.xml"/>
     <map:serialize type="svg2jpeg" />
  </map:match>
 </map:pipeline>
</map:pipelines>


A simple XML document 'svg1.xml':
---------------------------------
<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
                     "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd";>

<svg xmlns:xlink="http://www.w3.org/1999/xlink";>
  <defs>
    <path id="bowl"
          d="M 150 110 A 40 30 0 1 0 230 110"
          style="stroke: gray; fill: none;" />
  </defs>

  <title>cat</title>
  <desc>My Evolving SVG Version of a Cat</desc>
  <circle cx="70" cy="95" r="50" style="stroke: black; fill: yellow;"/>
  <text x="150" y="60" style="text-anchor: start">My wonderful little circle</text>

  <path id="bowl"
        d="M 150 110 A 40 30 0 1 0 230 110"
        style="stroke: gray; fill: none;" />


  <use  xlink:href="#bowl" />
</svg>


-----------------------------------
If I remove the <use> element above, the graphic gets generated as expected.
However, if left in, I get the following Cocoon error:

org.apache.cocoon.ProcessingException: Failed to execute pipeline.: 
org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
http://xml.apache.org:-1
The URI '' specified on the element <use> is invalid 

All I can think of is that Cocoon <use> has a different syntax, not using
xlink attributes.

This example comes pretty much straight out of the O'Reilly SVG Essentials
text, and I don't understand what is going wrong.

Any thoughts?

Thanks much.

--- Bob







---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to