public static void ConvertManifest(Manifest manifest, string packageLocation, bool localSchemas)
        {
            manifest.DeleteLocalImsSchemasToPackage(packageLocation);
            if (localSchemas)
            {
                manifest.AddLocalSchemasToPackage(packageLocation, QtiVersion.Qti22);
            }

            manifest.FindElementByName("schema")?.SetValue("QTIv2.2 Package");
            manifest.FindElementByName("schemaversion")?.SetValue("1.0.0");
            manifest.FindElementsByName("resource").ToList().ForEach(resource =>
            {
                switch (resource.GetAttribute("type")?.Value)
                {
                case "controlfile/xmlv1p0":
                    resource.GetAttribute("type").SetValue("webcontent");
                    break;

                case "imsqti_item_xmlv2p1":
                    resource.GetAttribute("type").SetValue("imsqti_item_xmlv2p2");
                    break;

                case "imsqti_test_xmlv2p1":
                    resource.GetAttribute("type").SetValue("imsqti_test_xmlv2p2");
                    break;

                case "associatedcontent/xmlv1p0/learning-application-resource":
                    resource.GetAttribute("type").SetValue("webcontent");
                    break;
                }
            });
        }
        public static void ConvertManifest(Manifest manifest, string packageLocation, bool localSchemas)
        {
            manifest.DeleteLocalImsSchemasToPackage(packageLocation);
            if (localSchemas)
            {
                manifest.AddLocalSchemasToPackage(packageLocation, QtiVersion.Qti21);
            }

            manifest.FindElementByName("schema")?.SetValue("IMS Content");
            manifest.FindElementByName("schemaversion")?.SetValue("2.1");
            manifest.FindElementsByName("resource").ToList().ForEach(resource =>
            {
                switch (resource.GetAttribute("type")?.Value)
                {
                case "imsqti_item_xmlv2p2":
                    resource.GetAttribute("type").SetValue("imsqti_item_xmlv2p1");
                    break;

                case "imsqti_test_xmlv2p2":
                    resource.GetAttribute("type").SetValue("imsqti_test_xmlv2p1");
                    break;

                case "webcontent":
                    resource.GetAttribute("type")
                    .SetValue(resource.ToString().IndexOf(".xsd", StringComparison.Ordinal) != -1
                                    ? "controlfile/xmlv1p0"
                                    : "associatedcontent/xmlv1p0/learning-application-resource");
                    break;
                }
            });
        }