DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=38558>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38558 Summary: ClassCastException when referencing an external svg file from within a dynamic svg doc Product: Batik Version: 1.6 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: SVG Viewer AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] I have an application that uses a dynamic JSVGCanvas (using SVN code 2005/02/07). However if I open an svg doc that references another svg doc via the <image> tag, document rendering fails. This only happens if the <image> is svg, png and jpeg images are not affected. I can get the same error to occur in Squiggle if I add an empty <script/> tag to force the document to be dynamic. I get the following error :- java.lang.ClassCastException at org.apache.batik.bridge.svg12.SVG12BridgeContext.addUIEventListeners(Unknown Source) at org.apache.batik.bridge.BridgeContext.createSubBridgeContext(Unknown Source) at org.apache.batik.bridge.svg12.SVG12BridgeContext.createSubBridgeContext(Unkn own Source) at org.apache.batik.bridge.SVGImageElementBridge.createSVGImageNode(Unknown Source) at org.apache.batik.bridge.SVGImageElementBridge.createRasterImageNode(Unknown Source) at org.apache.batik.bridge.SVGImageElementBridge.createImageGraphicsNode(Unknow n Source) at org.apache.batik.bridge.SVGImageElementBridge.buildImageGraphicsNode(Unknown Source) at org.apache.batik.bridge.SVGImageElementBridge.createGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source) at org.apache.batik.bridge.GVTBuilder.build(Unknown Source) at org.apache.batik.swing.svg.GVTTreeBuilder.run(Unknown Source) ============================== Sample svg file that works fine as long as the <script> tag is commented out. <?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg contentScriptType="text/ecmascript" zoomAndPan="magnify" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" version="1.2" width="326" preserveAspectRatio="none" viewBox="0 0 326 105" height="105" xmlns="http://www.w3.org/2000/svg" > <!-- <script type="text/ecmascript"> var svgNamespaceURI = "http://www.w3.org/2000/svg"; </script> --> <image width="100" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="n.svg" xlink:type="simple" xlink:actuate="onLoad" height="30" preserveAspectRatio="xMidYMid meet" xlink:show="embed" overflow="visible"/> <text x="20" font-size="8" y="40" font-family="Serif">test</text> </svg> ======================================== the n.svg referenced from <image> tag ======================================== <?xml version="1.0" encoding="utf-8"?> <svg xmlns="http://www.w3.org/2000/svg" version="1.2" width="87.118pt" height="16.598pt" viewBox="0 0 87.118 16.598" xml:space="preserve"> <text y="20" x="20">n</text> </svg> -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
