executionContext.setAttribute(DOCTYPE_KEY, new DocumentTypeData(name, publicId, systemId, xmlns));
    }
    public static DocumentTypeData getDocType(ExecutionContext executionContext) {
        List<SmooksResourceConfiguration> docTypeUDs = executionContext.getDeliveryConfig().getSmooksResourceConfigurations("doctype");
        SmooksResourceConfiguration docTypeSmooksResourceConfiguration = null;
        if(docTypeUDs != null && docTypeUDs.size() > 0) {
            docTypeSmooksResourceConfiguration = docTypeUDs.get(0);
        }
        // Only use the cdrdef if the override flag is set.  The override flag will
        // cause this DOCTYPE to override any DOCYTPE decl from the source doc.
        if(docTypeSmooksResourceConfiguration != null && docTypeSmooksResourceConfiguration.getBoolParameter("override", true)) {
            String name = docTypeSmooksResourceConfiguration.getStringParameter("name", "!!DOCTYPE name undefined - fix smooks-resource!!");
            String publicId = docTypeSmooksResourceConfiguration.getStringParameter("publicId", "!!DOCTYPE publicId undefined - fix smooks-resource!!");
            String systemId = docTypeSmooksResourceConfiguration.getStringParameter("systemId", "!!DOCTYPE systemId undefined - fix smooks-resource!!");
            String xmlns = docTypeSmooksResourceConfiguration.getStringParameter("xmlns");
            boolean omit = docTypeSmooksResourceConfiguration.getBoolParameter("omit", false);
            return new DocumentTypeData(name, publicId, systemId, xmlns, omit);
        }
        return (DocumentTypeData) executionContext.getAttribute(DOCTYPE_KEY);