Skip to content
This repository has been archived by the owner on Oct 30, 2021. It is now read-only.

--remove-nonsvg-elements no keeps <sodipodi:namedview/>, but prefix xmlns:sodipodi deleted #141

Closed
JoKalliauer opened this issue Apr 12, 2018 · 3 comments

Comments

@JoKalliauer
Copy link
Contributor

JoKalliauer commented Apr 12, 2018

Prozessing a file in Inkscape and saved as Inkscape-svg (default option in Inkscape) adds a <sodipodi:namedview-tag
prozessing such a file with

svgcleaner Inksape.svg output.svg --remove-nonsvg-elements no

leads to an error.

Inkscape.svg.txt

<?xml version="1.0" encoding="UTF-8"?>
<svg height="321.57" viewBox="0 0 29648.87 32162.91" width="296.49"
     xmlns="http://www.w3.org/2000/svg"
     xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd">
<sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="640" inkscape:window-height="480" id="namedview139" showgrid="false" inkscape:zoom="0.33380481" inkscape:cx="81.095887" inkscape:cy="86.96167" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="0" inkscape:current-layer="svg137" />
</svg>

output.svg.txt

<svg height="321.57" viewBox="0 0 29648.87 32162.91" width="296.49" xmlns="http://www.w3.org/2000/svg">
<sodipodi:namedview/>
</svg>

After Inkscape it makes sense too specify this option, because of #115

@RazrFalcon
Copy link
Owner

Yes. You must specify --remove-nonsvg-attributes too.

@JoKalliauer
Copy link
Contributor Author

I think a Warning would be great if someone calls svgcleaner with --remove-nonsvg-elements no --remove-nonsvg-attributes yes.

@RazrFalcon
Copy link
Owner

This options are completely independent now. I will think about it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants