docs: public void writeContainerPage(CmsObject cms, CmsContainerPageBean cntPage) throws CmsException {
  
          // keep unused containers
          CmsContainerPageBean savePage = cleanupContainersContainers(cms, cntPage);
          savePage = removeEmptyContainers(cntPage);
          // Replace existing locales with master locale
          for (Locale locale : getLocales()) {
              removeLocale(locale);
          }
          Locale masterLocale = CmsLocaleManager.MASTER_LOCALE;
          addLocale(cms, masterLocale);
  
          // add the nodes to the raw XML structure
          Element parent = getLocaleNode(masterLocale);
          saveContainerPage(cms, parent, savePage);
          initDocument(m_document, m_encoding, m_contentDefinition);
      }