Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support reading EBU-TT-D documents #62

Open
nigelmegitt opened this issue Jan 17, 2023 · 0 comments · May be fixed by #63 or #66
Open

Support reading EBU-TT-D documents #62

nigelmegitt opened this issue Jan 17, 2023 · 0 comments · May be fixed by #63 or #66
Assignees

Comments

@nigelmegitt
Copy link
Collaborator

Note gotcha: EBUTTDDocument.create_from_xml has a nasty hack workaround that tweaks the name of the document element to ttd instead of tt. Found during testing, a bug in ebu_tt_live/documents/ebuttd.py - it doesn't check for the presence of the prefix, so only works when the default namespace is the TTML namespace and no prefix is used on the tt element, i.e. fails for tt:tt

Fix is:

        if xml_dom.documentElement.tagName == xml_dom.documentElement.prefix + ':tt':
            xml_dom.documentElement.tagName = xml_dom.documentElement.prefix +  ':ttd'

In other words, test for the prefix.

@nigelmegitt nigelmegitt self-assigned this Jan 17, 2023
@nigelmegitt nigelmegitt linked a pull request Jan 17, 2023 that will close this issue
@nigelmegitt nigelmegitt linked a pull request Dec 26, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant