You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by noni_4444 <na...@gmail.com> on 2007/08/19 09:46:41 UTC

Squiggle gives Exception opening SVG with Custom Tags

Squiggle gives an exception when i try to open an SVG file containing custom
tags.

 Is there any way around? Cann't batik handle svg containing custom tags?. 

Any help in this regard would be highly appreciated.
Following is the complete text of the exception.

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:
animinfo).
	at org.apache.batik.dom.AbstractNode.createDOMException(Unknown Source)
	at org.apache.batik.dom.svg.SVGDOMImplementation.createElementNS(Unknown
Source)
	at org.apache.batik.dom.svg.SVGOMDocument.createElementNS(Unknown Source)
	at org.apache.batik.dom.util.SAXDocumentFactory.startElement(Unknown
Source)
	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
	at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
	at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown
Source)
	at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown
Source)
	at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown
Source)
	at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createSVGDocument(Unknown
Source)
	at org.apache.batik.bridge.DocumentLoader.loadDocument(Unknown Source)
	at org.apache.batik.swing.svg.SVGDocumentLoader.run(Unknown Source)

Naveed
-- 
View this message in context: http://www.nabble.com/Squiggle-gives-Exception-opening-SVG-with-Custom-Tags-tf4292652.html#a12220067
Sent from the Batik - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: Squiggle gives Exception opening SVG with Custom Tags

Posted by "G. Wade Johnson" <gw...@anomaly.org>.
On Sun, 19 Aug 2007 00:46:41 -0700 (PDT)
noni_4444 <na...@gmail.com> wrote:

> 
> Squiggle gives an exception when i try to open an SVG file containing
> custom tags.

If the custom tags are in the SVG namespace, the document is invalid.

>  Is there any way around? Cann't batik handle svg containing custom
> tags?. 

The solution is to put your custom tags in another namespace. Batik
does a good job of dealing with custom namespaces. Those tags will be
available in the DOM for reading and manipulation, but (obviously) will
not be rendered.

G. Wade

> Any help in this regard would be highly appreciated.
> Following is the complete text of the exception.
> 
> 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: animinfo).
> 	at
> org.apache.batik.dom.AbstractNode.createDOMException(Unknown Source)
> at
> org.apache.batik.dom.svg.SVGDOMImplementation.createElementNS(Unknown
> Source) at
> org.apache.batik.dom.svg.SVGOMDocument.createElementNS(Unknown
> Source) at
> org.apache.batik.dom.util.SAXDocumentFactory.startElement(Unknown
> Source) at
> org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
> Source) at
> org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
> Source) at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
> Source) at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> at
> org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown
> Source) at
> org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown
> Source) at
> org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown
> Source) at
> org.apache.batik.dom.svg.SAXSVGDocumentFactory.createSVGDocument(Unknown
> Source) at
> org.apache.batik.bridge.DocumentLoader.loadDocument(Unknown Source)
> at org.apache.batik.swing.svg.SVGDocumentLoader.run(Unknown Source)
> 
> Naveed


-- 
Strange women lying in ponds distributing swords is no basis for a
system of government.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org