dumistoklus / svg-xsd-schema

XSD schema for svg
MIT License
13 stars 8 forks source link

Can these schemata validate Inkscape SVGs? #2

Open kozross opened 5 years ago

kozross commented 5 years ago

I've tried using svg.xsd to validate an SVG file created using Inkscape. However, when I try that, I get these errors (using xmlstarlet):

$ xmlstarlet val -e --xsd ~/svg.xsd wz402a.svg
wz402a.svg:18.33: Element '{http://www.w3.org/2000/svg}svg', attribute '{http://www.inkscape.org/namespaces/inkscape}version': The attribute '{http://www.inkscape.org/namespaces/inkscape}version' is not allowed.
wz402a.svg:18.33: Element '{http://www.w3.org/2000/svg}svg', attribute '{http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd}docname': The attribute '{http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd}docname' is not allowed.
wz402a.svg:38.36: Element '{http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd}namedview': This element is not expected.
wz402a.svg - invalid

Am I using the schemata incorrectly?

kozross commented 5 years ago

Any progress on this issue?

mnvx commented 5 years ago

Hello. It seems what problem in Inkskape's exporter. Try to fix it before validation. Maybe it will helps: https://stackoverflow.com/q/13744422/1920758

kozross commented 5 years ago

@mnvx So I guess it doesn't like things namespaced with inkscape:? I haven't done any exporting - I just used it on an Inkscape SVG.