More information on exception:
java.lang.NullPointerException
at
org.apache.batik.bridge.svg12.DefaultXBLManager.stopProcessing(DefaultXBLManager.java:255)
at
org.apache.batik.dom.AbstractDocument.setXBLManager(AbstractDocument.java:1722)
at
org.apache.batik.bridge.UpdateManager.initializeScriptingEnvironment(UpdateManager.java:208)
at
org.apache.batik.bridge.UpdateManager.<init>(UpdateManager.java:167)
at
org.apache.batik.swing.svg.AbstractJSVGComponent.startSVGLoadEventDispatcher(AbstractJSVGComponent.java:878)
at
org.apache.batik.swing.svg.AbstractJSVGComponent$SVGListener.gvtBuildCompleted(AbstractJSVGComponent.java:1537)
at
org.apache.batik.swing.svg.GVTTreeBuilder$2.dispatch(GVTTreeBuilder.java:163)
at
org.apache.batik.util.EventDispatcher.dispatchEvent(EventDispatcher.java:103)
at
org.apache.batik.util.EventDispatcher.fireEvent(EventDispatcher.java:87)
at
org.apache.batik.util.EventDispatcher$1.run(EventDispatcher.java:46)
at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
// Remove all imports.
int nSlots = imports.values().size();
ImportRecord[] irs = new ImportRecord[ nSlots ];
imports.values().toArray( irs );
for (int i = 0; i < irs.length; i++) {
ImportRecord ir = irs[i];
Line 255 -->if
(ir.importElement.getLocalName().equals(XBL_DEFINITION_TAG)) { <--
removeDefinitionRef(ir.importElement);
} else {
removeImport(ir.importElement);
}
}
It appears that on line 255 the ir.importElement is null. This occurs
when creating normal Rect elements with SVG12DOMImplementation namespace.
It does not occur under the SVGDOMImplementation namespace.
Any ideas of what this importElement should be set to normally or how it
gets set? I am assuming my problem comes from not setting something up
correctly for SVG12DOMImplementation in my move from SVGDOMImplementation.
Thanks for your help,
Tom
On Wed, 23 Jan 2008 12:56:49 -0000, Tom McCallum <[EMAIL PROTECTED]>
wrote:
Hi,
I am trying to use the FlowText tags in my SVG document, similar to the
samples/extensions/flowTextAlign.svg. In my current trials with Batik I
have been using the following namespace
String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI
but when I try to create a FlowTextElement it given me the following:
org.w3c.dom.DOMException: The current document is unable to create an
element of the requested type (namespace: http://www.w3.org/2000/svg,
name: flowText).
Can someone please tell me what namespace I need to use to create these
elements, and also are there any changes to the way I am creating the
basic document so that I can create both SVG and Extension elements
besides the namespace?
DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
Document doc = impl.createDocument(svgNS,
SVGConstants.SVG_SVG_TAG, null);
in order to be able to use these Flow elements?
Thanks in advance for your help,
Tom
--
PS Note this is the new email address - delete [EMAIL PROTECTED] as it
won't work soon!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]