Skip to content

_remove_xmlns only removes one xmlns #55

@mfe

Description

@mfe

If a ccc contains several cc with a xmlns attribute each, only the first cc is going to be retrieved.
Sample code :

import cdl_convert.parse

path = '/path/to/xmlns_demo.ccc'
assert(len(cdl_convert.parse.parse_ccc(path).color_corrections) == 2)

xmlns_demo.ccc : https://gist.github.com/mfe/10873b57451afb4a40127860d8604554

Indeed, the code is only replacing 1 instance of xmlns :
https://github.com/shidarin/cdl_convert/blob/master/cdl_convert/parse.py#L745

I did this very simple fix to confirm my assumptions:
xml_string = re.sub(' xmlns="[^"]+"', '', xml_string)

It resolves the pb and I can retrieved both ccs.

How about that ?

Anyways, thanks for this great and very useful lib.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions