I have three separate svg files each referring to their own same and identical g='blah-common' in their respective defs, this is so that each works standalone and can be easily previewed.
When put through svgstore-cli the result is of course three copies of that g element and contents in the new defs, each with an id value of 'blah-common', which technically becomes invalid xml now (duplicate ID value!). Is there a way of doing a quick compare to see if an element with duplicated IDs are indeed identical (ie, their entire child tree) and if so, only use it once.
Or, alternatively, cripple the extra duplicated IDs (and any child duplicated ids) somehow so that although they're there, wasted, they don't cause the XML to be invalid.
Not sure what you should do if you get a duplicate ID but the content of the element is different. But that's a different problem.
I have three separate svg files each referring to their own same and identical g='blah-common' in their respective defs, this is so that each works standalone and can be easily previewed.
When put through svgstore-cli the result is of course three copies of that g element and contents in the new defs, each with an id value of 'blah-common', which technically becomes invalid xml now (duplicate ID value!). Is there a way of doing a quick compare to see if an element with duplicated IDs are indeed identical (ie, their entire child tree) and if so, only use it once.
Or, alternatively, cripple the extra duplicated IDs (and any child duplicated ids) somehow so that although they're there, wasted, they don't cause the XML to be invalid.
Not sure what you should do if you get a duplicate ID but the content of the element is different. But that's a different problem.