try {
addPreservationActionPlanData(collectionProfile, preservationActionPlan);
addPreservationActionPlanT2flow(executablePlanDefinition.getT2flowExecutablePlan(), preservationActionPlan);
QLDGenerator qldGen = new QLDGenerator();
qldGen.generateQLD(plan);
Element qualityLevelDescription = preservationActionPlan.addElement("qualityLevelDescription");
Element root = qldGen.getQldNode().getRootElement();
Element schema = qualityLevelDescription.addElement("schema", "http://purl.oclc.org/dsdl/schematron");
schema.addAttribute("xmlns", "http://purl.oclc.org/dsdl/schematron");
schema.add(root.element("pattern").detach());
} catch (ParserException e) {
throw new PlanningException("Error parsing collection profile", e);