diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-03-15 15:32:49 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-03-20 21:20:58 +0100 |
| commit | 066e30f30f851396bd6f10d50a448507e1c0b392 (patch) | |
| tree | b8de41fec71f78debe97ee9fcdd8dc3be65f9b45 /src/smpte_subtitle_asset.cc | |
| parent | 2516e657c80da672d1ea1ef5b5a189ef8799c070 (diff) | |
Nearly pretty-print subtitle XML (though not in <Text> nodes).v1.8.12
This is an attempt to fix DoM bug #2205.
Diffstat (limited to 'src/smpte_subtitle_asset.cc')
| -rw-r--r-- | src/smpte_subtitle_asset.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/smpte_subtitle_asset.cc b/src/smpte_subtitle_asset.cc index f09d99f3..0693323c 100644 --- a/src/smpte_subtitle_asset.cc +++ b/src/smpte_subtitle_asset.cc @@ -344,8 +344,6 @@ SMPTESubtitleAsset::xml_as_string () const { xmlpp::Document doc; auto root = doc.create_root_node ("SubtitleReel"); - root->set_namespace_declaration (subtitle_smpte_ns); - root->set_namespace_declaration ("http://www.w3.org/2001/XMLSchema", "xs"); DCP_ASSERT (_xml_id); root->add_child("Id")->add_child_text("urn:uuid:" + *_xml_id); @@ -374,7 +372,7 @@ SMPTESubtitleAsset::xml_as_string () const subtitles_as_xml (root->add_child("SubtitleList"), _time_code_rate, Standard::SMPTE); - return doc.write_to_string ("UTF-8"); + return format_xml(doc, { {"", subtitle_smpte_ns}, {"xs", "http://www.w3.org/2001/XMLSchema"} }); } |
