Bug 40397 - Batik fails on most GNOME SVG files
Summary: Batik fails on most GNOME SVG files
Status: RESOLVED INVALID
Alias: None
Product: Batik - Now in Jira
Classification: Unclassified
Component: SVG DOM (show other bugs)
Version: 1.8
Hardware: Other other
: P2 normal
Target Milestone: ---
Assignee: Batik Developer's Mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-02 02:19 UTC by Kirill Grouchnikov
Modified: 2006-09-03 10:55 UTC (History)
0 users



Attachments
Sample SVG file (10.39 KB, text/xml)
2006-09-02 02:20 UTC, Kirill Grouchnikov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kirill Grouchnikov 2006-09-02 02:19:02 UTC
Batik (and the sample test application in the JSVGCanvas tutorial) fails to opne
most of the GNOME SVG files. The entire GNOME iconset can be downloaded from
[1]. Attaching a sample file that produces the following stack trace:

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: sfw).
	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.dtd.XMLDTDValidator.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)
Comment 1 Kirill Grouchnikov 2006-09-02 02:20:37 UTC
Created attachment 18809 [details]
Sample SVG file

Forgot to provide a link to the complete GNOME set download:

http://ftp.gnome.org/pub/GNOME/sources/gnome-themes-extras/0.9/
Comment 2 Cameron McCormack 2006-09-03 06:58:26 UTC
Looking at that bundle of SVG files, they seem to have many errors with respect
to namespaces (and some other things).  From the error you are getting, and not
knowing which particular file you tried, it certainly looks like a case of the
'sfw' element being placed in the SVG namespace rather than a different namespace.

If you find a particular case you think is valid SVG, and Batik doesn't handle
it, please make a not of which particular file it is.
Comment 3 Kirill Grouchnikov 2006-09-03 07:13:33 UTC
Well, these are GNOME SVG files - aren't those supposed to be valid SVGs,
especially the so popular Nuvola set, since these are used under librsvg in
GNOME? Almost all Nuvola SVG files in that archive fail to open in Batik.
Comment 4 Cameron McCormack 2006-09-03 07:26:27 UTC
You'd hope they were valid!  But it appears they are not.  librsvg is likely
very tolerant of non-conforming SVG files (i.e., files that look like SVG files
but aren't really).

I'll look into filing a bug report with the GNOME people.
Comment 5 Kirill Grouchnikov 2006-09-03 17:55:32 UTC
If you contact GNOME people, please send me a link to kirillcool@yahoo.com

I have some entries on my blog [1] and [2] that i'd like to keep as correct and
updated as possible. Nuvola's creator e-mail is david@icon-king.com and his
website is http://www.icon-king.com

[1] http://weblogs.java.net/blog/kirillcool/archive/2006/09/svg_and_java_ui_1.html
[2] http://weblogs.java.net/blog/kirillcool/archive/2006/09/svg_and_java_ui.html