code: public static String addDocBookPreamble(final DocBookVersion docBookVersion, final String xml, final String elementName,
              final String entityName) {
          if (docBookVersion == DocBookVersion.DOCBOOK_50) {
              final String xmlWithNamespace = DocBookUtilities.addDocBook50Namespace(xml, elementName);
              return XMLUtilities.addDoctype(xmlWithNamespace, elementName, entityName);
          } else {
              return DocBookUtilities.addDocBook45Doctype(xml, entityName, elementName);
          }
      }
docs: Adds any content to the xml that is required for the specified DocBook version.
  
  @param docBookVersion The DocBook version to add the preamble content for.
  @param xml            The XML to add the preamble content to.
  @param elementName    The name that the root element should be.
  @param entityName     The name of the local entity file, if one exists.
  @return