Hello,
 
When i do...
 
SVGDocument doc = (SVGDocument) svgDoc.cloneNode(true);
 
=> 

org.w3c.dom.DOMException: Cannot import node.

at
org.apache.batik.dom.AbstractNode.createDOMException(AbstractNode.java:4
08)

at
org.apache.batik.dom.AbstractDocument.importNode(AbstractDocument.java:4
01)

at
org.apache.batik.dom.AbstractDocument.importNode(AbstractDocument.java:3
26)

at
org.apache.batik.dom.AbstractDocument.cloneNode(AbstractDocument.java:43
5)

at at.pke.ag.print.Printer.createDocument(Printer.java:542)

at at.pke.ag.print.Printer.access$6(Printer.java:532)

at at.pke.ag.print.Printer$5.run(Printer.java:831)

In the 1.7 batik it works.... in the 1.8pre not ! see error above...

I looked into the code... there is a switch statement 

 switch (importedNode.getNodeType()) {

.... and the type is 10 .. so it goes to default and throws the
exception ...

}

 

I tried the workaround:

(SVGDocument) DOMUtilities.deepCloneDocument(svgDoc,
svgDoc.getImplementation());

But there a nother problems when i get the Stylesheets ... 

Reply via email to