docs: private String createResourceToEdit(
          String newLink,
          Locale locale,
          String referenceSitePath,
          String modelFileSitePath,
          String mode,
          String postCreateHandler,
          CmsEditHandlerData editHandlerData)
      throws CmsException {
  
          CmsObject cms = getCmsObject();
          HttpServletRequest request = getRequest();
          if (editHandlerData != null) {
              CmsContainerpageService containerpageService = new CmsContainerpageService();
              containerpageService.setCms(cms);
              containerpageService.setRequest(request);
              CmsResource page = cms.readResource(editHandlerData.getPageContextId(), CmsResourceFilter.ALL);
              CmsContainerElementBean elementBean = containerpageService.getCachedElement(
                  editHandlerData.getClientId(),
                  page.getRootPath());
              Map<String, String[]> params = CmsRequestUtil.createParameterMap(
                  CmsEncoder.decode(editHandlerData.getRequestParams()),
                  true,
                  CmsEncoder.ENCODING_UTF_8);
              elementBean.initResource(cms);
              CmsResource elementResource = elementBean.getResource();
              I_CmsResourceType type = OpenCms.getResourceManager().getResourceType(elementResource);
              if (type instanceof CmsResourceTypeXmlContent) {
                  CmsResourceTypeXmlContent xmlType = (CmsResourceTypeXmlContent)type;
                  I_CmsEditHandler handler = xmlType.getEditHandler(cms);
                  if (handler != null) {
                      return handler.handleNew(
                          cms,
                          newLink,
                          locale,
                          referenceSitePath,
                          modelFileSitePath,
                          postCreateHandler,
                          elementBean,
                          editHandlerData.getPageContextId(),
                          params,
                          editHandlerData.getOption());
  
                  } else {
                      LOG.warn(
                          "Invalid state: edit handler data passed in, but edit handler is undefined. type = "
                              + type.getTypeName());
                  }
              } else {
                  LOG.warn("Invalid state: edit handler data passed in for non-XML content type.");
              }
          }
          return defaultCreateResourceToEdit(
              cms,
              newLink,
              locale,
              referenceSitePath,
              modelFileSitePath,
              mode,
              postCreateHandler);
      }