Open JoKalliauer opened 5 years ago
Prozessing File:McCree-Kurve_1_DE.svg leads to a removement of the comments
svgcleaner Input.svg.txt output.svg.txt --allow-bigger-file --indent 1 --remove-comments no
lead to Warning: 'text' element should contain only element and text nodes
Warning: 'text' element should contain only element and text nodes
but according to https://www.w3.org/TR/2011/WD-SVG11-20110512/struct.html <text systemLanguage="mi, en"><!-- content goes here --></text> should be correct syntax.
<text systemLanguage="mi, en"><!-- content goes here --></text>
Input.svg.txt
<svg font-family="DejaVu Sans,sans-serif" font-size="450" viewBox="0 0 16300 10100" xmlns="http://www.w3.org/2000/svg"> <text text-anchor="middle" transform="rotate(-90)" x="-4500" y="15800">relative Quantenausbeute [%]</text> <text><!-- - - --><tspan x="14500" y="1120">100</tspan><!-- - - --><tspan x="14500" y="1840">90</tspan><!-- - - --><tspan x="14500" y="2560">80</tspan><!-- - - --><tspan x="14500" y="3280">70</tspan><!-- - - --><tspan x="14500" y="4000">60</tspan><!-- - - --><tspan x="14500" y="4720">50</tspan><!-- - - --><tspan x="14500" y="5440">40</tspan><!-- - - --><tspan x="14500" y="6160">30</tspan><!-- - - --><tspan x="14500" y="6880">20</tspan><!-- - - --><tspan x="14500" y="7600">10</tspan><!-- - - --></text> <text text-anchor="middle" x="8200" y="9700">Wellenlänge [nm]</text> <text text-anchor="end" transform="rotate(-90)"><!-- - - --><tspan x="-8400" y="2150">300</tspan><!-- - - --><tspan x="-8400" y="4600">400</tspan><!-- - - --><tspan x="-8400" y="7050">500</tspan><!-- - - --><tspan x="-8400" y="9520">600</tspan><!-- - - --><tspan x="-8400" y="11980">700</tspan><!-- - - --><tspan x="-8400" y="14450">800</tspan><!-- - - --></text> <g text-anchor="middle"> <text x="3200" y="8700">UV</text> <text x="13000" y="8700">IR</text> <text transform="rotate(-90)" x="-4500" y="800">relative Energie [%]</text> </g> <text text-anchor="end"><!-- - - --><tspan x="1700" y="1120">100</tspan><!-- - - --><tspan x="1700" y="1840">90</tspan><!-- - - --><tspan x="1700" y="2560">80</tspan><!-- - - --><tspan x="1700" y="3280">70</tspan><!-- - - --><tspan x="1700" y="4000">60</tspan><!-- - - --><tspan x="1700" y="4720">50</tspan><!-- - - --><tspan x="1700" y="5440">40</tspan><!-- - - --><tspan x="1700" y="6160">30</tspan><!-- - - --><tspan x="1700" y="6880">20</tspan><!-- - - --><tspan x="1700" y="7600">10</tspan><!-- - - --></text> </svg>
output.svg.txt
<svg font-family="DejaVu Sans,sans-serif" font-size="450" viewBox="0 0 16300 10100" xmlns="http://www.w3.org/2000/svg"> <text text-anchor="middle" transform="rotate(-90)" x="-4500" y="15800">relative Quantenausbeute [%]</text> <text><tspan x="14500" y="1120">100</tspan><tspan x="14500" y="1840">90</tspan><tspan x="14500" y="2560">80</tspan><tspan x="14500" y="3280">70</tspan><tspan x="14500" y="4000">60</tspan><tspan x="14500" y="4720">50</tspan><tspan x="14500" y="5440">40</tspan><tspan x="14500" y="6160">30</tspan><tspan x="14500" y="6880">20</tspan><tspan x="14500" y="7600">10</tspan></text> <text text-anchor="middle" x="8200" y="9700">Wellenlänge [nm]</text> <text text-anchor="end" transform="rotate(-90)"><tspan x="-8400" y="2150">300</tspan><tspan x="-8400" y="4600">400</tspan><tspan x="-8400" y="7050">500</tspan><tspan x="-8400" y="9520">600</tspan><tspan x="-8400" y="11980">700</tspan><tspan x="-8400" y="14450">800</tspan></text> <g text-anchor="middle"> <text x="3200" y="8700">UV</text> <text x="13000" y="8700">IR</text> <text transform="rotate(-90)" x="-4500" y="800">relative Energie [%]</text> </g> <text text-anchor="end"><tspan x="1700" y="1120">100</tspan><tspan x="1700" y="1840">90</tspan><tspan x="1700" y="2560">80</tspan><tspan x="1700" y="3280">70</tspan><tspan x="1700" y="4000">60</tspan><tspan x="1700" y="4720">50</tspan><tspan x="1700" y="5440">40</tspan><tspan x="1700" y="6160">30</tspan><tspan x="1700" y="6880">20</tspan><tspan x="1700" y="7600">10</tspan></text> </svg>
Yes. It's not supported, afair.
Prozessing File:McCree-Kurve_1_DE.svg leads to a removement of the comments
svgcleaner Input.svg.txt output.svg.txt --allow-bigger-file --indent 1 --remove-comments no
lead to
Warning: 'text' element should contain only element and text nodes
but according to https://www.w3.org/TR/2011/WD-SVG11-20110512/struct.html
<text systemLanguage="mi, en"><!-- content goes here --></text>
should be correct syntax.Input
Input.svg.txt
Output
output.svg.txt
Copyright
Lizense: CC0 source: https://commons.wikimedia.org/wiki/File:McCree-Kurve_1_DE.svg