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=40927>.
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=40927

           Summary: DOMUtilities#deepCloneDocument(Document,
                    DOMImplementation)  returns corrupted document
           Product: Batik
           Version: 2.0
          Platform: Other
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Bridge
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


A GMF client application is capable of substituting fill and stop colors if they
are white or black with user customized colors. Color substitution is done
manually by iterating through document node elements. Before the color switching
is done the original SVGOMDocument is cloned using
DOMUtilities.deepCloneDocument() method as following:

DOMImplementation impl;
impl = SVGDOMImplementation.getDOMImplementation();
document = DOMUtilities.deepCloneDocument(document, impl);

The end document is one used by GVTBuilder.build() which throws the following
BridgeException with the code = "uri.malformed". Therefore, the image is not
rendered. This is without color switching - the cloned document is untouched.
Full stack trace is listed at the bottom.

If the document is not cloned, no exceptions thrown and the image is rendered. 

The exception occurs for image: "SVG_gradient_noattr.svg"
but doesn't occur for image: "SVG_flat.svg"
(Both images will be attached)

Since, I would expect cloned and the original documents to be handled in the
same way by GVTBuilder#build(BridgeContext, SVGOMDocument), perhaps there is a
bug somewhere in DOMUtilities.deepCloneDocument()?

Would be nice to know what's special about image "SVG_gradient_noattr.svg"
compared to "SVG_flat.svg"? Why the first one gives an exception and the second
doesn't?

Note: http://issues.apache.org/bugzilla/show_bug.cgi?id=40862 might be related
to this one.


Stack Trace:

org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
null:-1
The URI "#linearGradient7288"
specified on the element <linearGradient> is invalid

        at
org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.svg.ImageTranscoderEx.transcode(ImageTranscoderEx.java)

        at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown 
Source)

        at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown 
Source)

        at
org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.svg.SVGImageConverter.setUpTranscoders(SVGImageConverter.java:148)

        at
org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.svg.SVGImageConverter.renderSVGtoSWTImage(SVGImageConverter.java:74)

        at
org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.svg.SVGImage.renderImage(SVGImage.java:68)

        at
org.eclipse.gmf.runtime.draw2d.ui.render.internal.AbstractRenderedImage.getSWTImage(AbstractRenderedImage.java:130)

        at
org.eclipse.gmf.runtime.draw2d.ui.render.internal.RenderHelper$1.run(RenderHelper.java:103)

        at java.lang.Thread.run(Thread.java:797)

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

Reply via email to