Make the former dcst namespace default for SMPTE subtitles.
authorCarl Hetherington <cth@carlh.net>
Sun, 3 Oct 2021 20:18:56 +0000 (22:18 +0200)
committerCarl Hetherington <cth@carlh.net>
Sun, 3 Oct 2021 20:18:56 +0000 (22:18 +0200)
commitfac4b92813714d5b6bdaaa4425bf0bf81dbd1a45
tree0720f95e880e0805f5a10bb2965a714e36c9b49e
parent0c547a78ef47564190506ae07cd3ae7b17c5fad9
Make the former dcst namespace default for SMPTE subtitles.

In DoM bug #2061 it is reported that Easy DCP gives the error

"XML Document has default root namespace prefix: dcst.
 Default namespace should not use prefix for root or root namespace child nodes."

with SMPTE subtitle files written by DCP-o-matic, and that the correct
fix is to make the former dcst: namespace the default and then remove
the dcst: qualifiers from everything.

I'm not sure I agree with the error; AFAICS the subtitle files written
by previous versions did not have a default root namespace prefix,
since it was specified by xmlns:dcst and not just xmlns alone, so I
think they were valid.

However, using a default NS also seems fine, slightly simplifies the
code and produces more compact subtitle files, so we change that here.
It should also stop Easy DCP complaining, which is always marginally
preferable to sticking to our guns and getting the blame for it.
src/smpte_subtitle_asset.cc
src/subtitle_asset_internal.cc
src/subtitle_asset_internal.h
test/smpte_subtitle_test.cc
test/verify_test.cc