It seems like a bug in Batik, at least in your version. I tested it with 1.5b2 from Cocoon and 1.5b4 offline without any problems. What version are you using?

Joerg

Yury Mikhienko wrote:
Hi all!

Can anyone help me with the following problem:
When I tried the generate png from the svg file (with using <use> tag) I have the following error:

Original exception : org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
http://xml.apache.org:-1
The URI '' specified on the element <use> is invalid
at org.apache.cocoon.serialization.SVGSerializer.notify(SVGSerializer.java:272)
at org.apache.cocoon.xml.dom.SVGBuilder.endDocument(SVGBuilder.java:134)
at org.apache.xerces.parsers.AbstractSAXParser.endDocument(AbstractSAXParser.java:724)
...
Where I'm wrong? (It bug in batik?)
my test.svg:

<?xml version="1.0" standalone="no"?>
  <svg width="10cm" height="3cm" viewBox="0 0 100 30"
        xmlns:xlink="http://www.w3.org/1999/xlink";>
    <desc>Example Use01 - Simple case of 'use' on a 'rect'</desc>
     <defs>
       <rect id="MyRect" width="60" height="10"/>
     </defs>
     <rect x=".1" y=".1" width="99.8" height="29.8"
        fill="none" stroke="blue" stroke-width=".2" />
     <use x="20" y="10" xlink:href="#MyRect" />
  </svg>

Thanx for advise.

---------------------------------------------------------------------
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