diff --git a/docs/manifest-format.md b/docs/manifest-format.md index 8e5e28749..6156333a6 100644 --- a/docs/manifest-format.md +++ b/docs/manifest-format.md @@ -109,6 +109,12 @@ following DTD: ]> ``` +For compatibility purposes across repo releases, all unknown elements are +silently ignored. However, repo reserves all possible names for itself for +future use. If you want to use custom elements, the `x-*` namespace is +reserved for that purpose, and repo guarantees to never allocate any +corresponding names. + A description of the elements and their attributes follows. diff --git a/tests/test_manifest_xml.py b/tests/test_manifest_xml.py index e4adf3c99..e2c83af97 100644 --- a/tests/test_manifest_xml.py +++ b/tests/test_manifest_xml.py @@ -280,6 +280,27 @@ class XmlManifestTests(unittest.TestCase): '' + '') + def test_unknown_tags(self): + """Check superproject settings.""" + manifest = self.getXmlManifest(""" + + + + + + X tags are always ignored + +""") + self.assertEqual(manifest.superproject['name'], 'superproject') + self.assertEqual(manifest.superproject['remote'].name, 'test-remote') + self.assertEqual( + manifest.ToXml().toxml(), + '' + + '' + + '' + + '' + + '') + def test_project_group(self): """Check project group settings.""" manifest = self.getXmlManifest("""