I have found a bug in the SVG serialization: I can't serialize an SVG to a JPEG or PNG if the SVG contains an <image> tag. Is it just me? Or is the SVG serializer broken?
Help! I'm running Cocoon 2.0.2 on JRE 1.3.1_03 on Windows 2000. I will log a bug with Bugzilla, but I thought I'd ask first, if anyone else has tried to serialize an SVG containing an image tag; perhaps I'm doing something wrong. I can use the Batik rasterizer (command-line) successfully with the same SVG. This is the SVG document: <?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="http://www.w3.org/2000/svg" width="534" height="759"> <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="Ba01S000.jpg" x="0" y="0" width="534" height="759"/> </svg> If I remove the <image> element from my SVG, I get a beautiful white rectangular JPEG ;-) This is a snippet from my sitemap: <map:match pattern="nzetc/images/thumbnails/*.jpg"> <map:generate src="nzetc/images/{1}.svg"/> <map:serialize type="svg2jpeg"/> </map:match> Here is the stack trace: Original exception : org.apache.batik.transcoder.TranscoderException: null Enclosed Exception: http://xml.apache.org:-1 The attribute 'xlink:href' of the element <image> is required at org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown Source) at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source) at org.apache.cocoon.serialization.SVGSerializer.notify(SVGSerializer.java:268) at org.apache.cocoon.xml.dom.SVGBuilder.endDocument(SVGBuilder.java:134) at org.apache.xerces.parsers.AbstractSAXParser.endDocument(AbstractSAXParser.ja va:724) at org.apache.xerces.impl.XMLNamespaceBinder.endDocument(XMLNamespaceBinder.jav a:704) at org.apache.xerces.impl.dtd.XMLDTDValidator.endDocument(XMLDTDValidator.java: 997) at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(XMLDocumentScannerIm pl.java:437) at org.apache.xerces.impl.XMLEntityManager.endEntity(XMLEntityManager.java:1150 ) at org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(XMLEntityManager. java:3195) at org.apache.xerces.impl.XMLEntityManager$EntityScanner.skipSpaces(XMLEntityMa nager.java:2896) at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatc h(XMLDocumentScannerImpl.java:987) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume ntFragmentScannerImpl.java:333) at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserCo nfiguration.java:525) at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserCo nfiguration.java:581) at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147) at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:115 7) at org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:241) at org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStrea mSource.java:206) at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:142) at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv entPipeline.java:251) at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS treamPipeline.java:399) > -----Original Message----- > From: J.Pietschmann [mailto:[EMAIL PROTECTED]] > Sent: Friday, 19 April 2002 08:33 > To: [EMAIL PROTECTED] > Subject: Re: problem with linked jpg in svg: The attribute > 'xlink:href' > of the element <image> is required > > > Conal Tuohy wrote: > > I'm trying to serialize a simple SVG document, but I get an error: > > You don't have the svg namespace declared. Did you delete > the DOCTYPE? > Check whether your SVG code runs in the Batik standalone > viewer. The batik-user list may be of some help if it does > not. > > J.Pietschmann > > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]