diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-09-08 20:42:55 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-09-21 21:57:18 +0200 |
| commit | cdd98db2de839a5ef14b3c9c67a58392a8e123c1 (patch) | |
| tree | 49253d02f5c808dd0f3923c5b5861ea8a7182f6b /src | |
| parent | 68b7ad9d59f73e26368b3a42d4d7ed1a77805237 (diff) | |
Verify MCA tags.
Diffstat (limited to 'src')
| -rw-r--r-- | src/verify.cc | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/verify.cc b/src/verify.cc index f888c62d..0b48ce24 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -196,6 +196,9 @@ public: LocalFileResolver (boost::filesystem::path xsd_dtd_directory) : _xsd_dtd_directory (xsd_dtd_directory) { + /* XXX: I'm not clear on what things need to be in this list; some XSDs are apparently, magically + * found without being here. + */ add("http://www.w3.org/2001/XMLSchema.dtd", "XMLSchema.dtd"); add("http://www.w3.org/2001/03/xml.xsd", "xml.xsd"); add("http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd", "xmldsig-core-schema.xsd"); @@ -273,6 +276,7 @@ validate_xml (T xml, boost::filesystem::path xsd_dtd_directory, list<Verificatio parser.setDoSchema(true); vector<string> schema; + schema.push_back("xml.xsd"); schema.push_back("xmldsig-core-schema.xsd"); schema.push_back("SMPTE-429-7-2006-CPL.xsd"); schema.push_back("SMPTE-429-8-2006-PKL.xsd"); @@ -287,8 +291,16 @@ validate_xml (T xml, boost::filesystem::path xsd_dtd_directory, list<Verificatio schema.push_back("SMPTE-429-16.xsd"); schema.push_back("Dolby-2012-AD.xsd"); schema.push_back("SMPTE-429-10-2008.xsd"); - - /* XXX: I'm not especially clear what this is for, but it seems to be necessary */ + schema.push_back("xlink.xsd"); + schema.push_back("SMPTE-335-2012.xsd"); + schema.push_back("SMPTE-395-2014-13-1-aaf.xsd"); + schema.push_back("isdcf-mca.xsd"); + schema.push_back("SMPTE-429-12-2008.xsd"); + + /* XXX: I'm not especially clear what this is for, but it seems to be necessary. + * Schemas that are not mentioned in this list are not read, and the things + * they describe are not checked. + */ string locations; BOOST_FOREACH (string i, schema) { locations += String::compose("%1 %1 ", i, i); @@ -561,6 +573,8 @@ dcp::verify ( notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::GENERAL_READ, string(e.what()))); } catch (XMLError& e) { notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::GENERAL_READ, string(e.what()))); + } catch (MXFFileError& e) { + notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::GENERAL_READ, string(e.what()))); } catch (cxml::Error& e) { notes.push_back (VerificationNote(VerificationNote::VERIFY_ERROR, VerificationNote::GENERAL_READ, string(e.what()))); } |
