docs: private void performRenameOperation(List xmlPages, Locale locale) {
  
          // partial localized (stopped due to low prio).
          boolean removeEmptyElements = Boolean.valueOf(getParamRemoveEmptyElements()).booleanValue();
          boolean validateNewElement = Boolean.valueOf(getParamValidateNewElement()).booleanValue();
          // the list including at least one resource
          if ((xmlPages != null) && (xmlPages.size() > 0)) {
              m_report.println(
                  Messages.get().container(Messages.RPT_RENAME_LANG_1, locale.getLanguage()),
                  I_CmsReport.FORMAT_HEADLINE);
              // if user has not selected ALL templates, then retain pages with specified template
              if (!ALL.equals(getParamTemplate())) {
                  xmlPages = getRetainedPagesWithTemplate(xmlPages);
              }
              int m = 0;
              int n = xmlPages.size();
              // loop over remained pages
              Iterator i = xmlPages.iterator();
              while (i.hasNext()) {
                  m++;
                  CmsXmlPage page = null;
                  try {
                      // next file from the list
                      CmsResource res = (CmsResource)i.next();
                      CmsFile file;
  
                      m_report.print(
                          org.opencms.report.Messages.get().container(
                              org.opencms.report.Messages.RPT_SUCCESSION_2,
                              String.valueOf(m),
                              String.valueOf(n)),
                          I_CmsReport.FORMAT_NOTE);
                      m_report.print(Messages.get().container(Messages.RPT_PROCESSING_PAGE_0), I_CmsReport.FORMAT_NOTE);
                      m_report.print(
                          org.opencms.report.Messages.get().container(
                              org.opencms.report.Messages.RPT_ARGUMENT_1,
                              getCms().getSitePath(res)));
                      m_report.println(
                          org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_DOTS_0));
  
                      try {
                          file = getCms().readFile(getCms().getSitePath(res), CmsResourceFilter.IGNORE_EXPIRATION);
                      } catch (CmsException e2) {
                          if (LOG.isErrorEnabled()) {
                              LOG.error(e2);
                          }
                          m_report.println(e2);
                          continue;
                      }
                      // try unmarshaling to xml page
                      try {
                          page = CmsXmlPageFactory.unmarshal(getCms(), file);
                      } catch (CmsXmlException e) {
                          m_report.println(e);
                          continue;
                      }
  
                      // check if the source element exists in the page
                      if (!page.hasValue(getParamOldElement(), locale)) {
                          m_report.println(
                              Messages.get().container(Messages.RPT_NONEXISTANT_ELEM_1, getParamOldElement()),
                              I_CmsReport.FORMAT_NOTE);
                          continue;
                      }
  
                      // check if the target element already exists in the page
                      if (page.hasValue(getParamNewElement(), locale)) {
                          // the page contains already the new element with speicific content.
                          // renaming the old will invalid the xml page
                          m_report.println(
                              Messages.get().container(Messages.RPT_NEW_ELEM_EXISTS_0),
                              I_CmsReport.FORMAT_NOTE);
                          continue;
                      }
  
                      if (validateNewElement) {
                          // check if the target element is valid for the template
                          if (!isValidElement(page, getParamNewElement())) {
                              m_report.println(
                                  Messages.get().container(Messages.RPT_INVALID_ARGUMENT_1, getParamNewElement()),
                                  I_CmsReport.FORMAT_NOTE);
                              continue;
                          }
                      }
  
                      try {
                          // rename the element from the old value to the new
                          page.renameValue(getParamOldElement(), getParamNewElement(), locale);
                          // write the page with the new content
                          writePageAndReport(page, true);
                      } catch (Throwable t) {
                          LOG.error(t);
                          m_report.println(t);
                          continue;
                      }
  
                  } catch (Throwable t) {
                      LOG.error(t);
                      m_report.println(t);
                  } finally {
                      // finally do remove empty elements of the page
                      // the remove operation is executed if the user has checked the specified checkbox and selected a template (NOT ALL)
                      if (removeEmptyElements) {
                          removeInValidElements(page, locale);
                      }
                  }
              }
          }
      }