Skip to content

identical elements with identical ID values in input defs should result in only one copy in output def #14

Description

@u0421793

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions