docs: protected void removeEmptyMappings(CmsObject cms, CmsFile file, CmsXmlContent content) throws CmsException {
  
          List<CmsResource> siblings = null;
          CmsObject rootCms = null;
  
          Iterator<Map.Entry<String, List<String>>> allMappings = m_elementMappings.entrySet().iterator();
          while (allMappings.hasNext()) {
              Map.Entry<String, List<String>> e = allMappings.next();
              String path = e.getKey();
              List<String> mappings = e.getValue();
              if (mappings == null) {
                  // nothing to do if we have no mappings at all
                  continue;
              }
              if ((siblings == null) || (rootCms == null)) {
                  // create OpenCms user context initialized with "/" as site root to read all siblings
                  rootCms = OpenCms.initCmsObject(cms);
                  rootCms.getRequestContext().setSiteRoot("/");
                  siblings = rootCms.readSiblings(content.getFile().getRootPath(), CmsResourceFilter.IGNORE_EXPIRATION);
              }
              for (int v = mappings.size() - 1; v >= 0; v--) {
                  String mapping = mappings.get(v);
  
                  if (mapping.startsWith(MAPTO_ATTRIBUTE)
                      || mapping.startsWith(MAPTO_PROPERTY_LIST)
                      || mapping.startsWith(MAPTO_PROPERTY)) {
                      for (int i = 0; i < siblings.size(); i++) {
  
                          // get siblings filename and locale
                          String filename = siblings.get(i).getRootPath();
                          Locale locale = OpenCms.getLocaleManager().getDefaultLocale(rootCms, filename);
  
                          if (!content.hasLocale(locale)) {
                              // only remove property if the locale fits
                              continue;
                          }
                          if (content.hasValue(path, locale)) {
                              // value is available, property must be kept
                              continue;
                          }
  
                          if (mapping.startsWith(MAPTO_PROPERTY_LIST) || mapping.startsWith(MAPTO_PROPERTY)) {
  
                              String property;
                              boolean shared = false;
                              if (mapping.startsWith(MAPTO_PROPERTY_LIST_INDIVIDUAL)) {
                                  property = mapping.substring(MAPTO_PROPERTY_LIST_INDIVIDUAL.length());
                              } else if (mapping.startsWith(MAPTO_PROPERTY_LIST_SHARED)) {
                                  property = mapping.substring(MAPTO_PROPERTY_LIST_SHARED.length());
                                  shared = true;
                              } else if (mapping.startsWith(MAPTO_PROPERTY_LIST)) {
                                  property = mapping.substring(MAPTO_PROPERTY_LIST.length());
                              } else if (mapping.startsWith(MAPTO_PROPERTY_SHARED)) {
                                  property = mapping.substring(MAPTO_PROPERTY_SHARED.length());
                                  shared = true;
                              } else if (mapping.startsWith(MAPTO_PROPERTY_INDIVIDUAL)) {
                                  property = mapping.substring(MAPTO_PROPERTY_INDIVIDUAL.length());
                              } else {
                                  property = mapping.substring(MAPTO_PROPERTY.length());
                              }
                              rootCms.writePropertyObject(
                                  filename,
                                  new CmsProperty(
                                      property,
                                      CmsProperty.DELETE_VALUE,
                                      shared ? CmsProperty.DELETE_VALUE : null));
                          } else if (mapping.startsWith(MAPTO_ATTRIBUTE)) {
                              if (mapping.equals(MAPTO_ATTRIBUTE + ATTRIBUTE_DATERELEASED)) {
                                  rootCms.setDateReleased(filename, CmsResource.DATE_RELEASED_DEFAULT, false);
                                  if (filename.equals(rootCms.getSitePath(file))) {
                                      file.setDateReleased(CmsResource.DATE_RELEASED_DEFAULT);
                                  }
                              } else if (mapping.equals(MAPTO_ATTRIBUTE + ATTRIBUTE_DATEEXPIRED)) {
                                  rootCms.setDateExpired(filename, CmsResource.DATE_EXPIRED_DEFAULT, false);
                                  if (filename.equals(rootCms.getSitePath(file))) {
                                      file.setDateExpired(CmsResource.DATE_EXPIRED_DEFAULT);
                                  }
                              }
                          }
                      }
                  } else if (mapping.startsWith(MAPTO_PERMISSION)) {
                      for (int i = 0; i < siblings.size(); i++) {
  
                          // get siblings filename and locale
                          String filename = siblings.get(i).getRootPath();
                          Locale locale = OpenCms.getLocaleManager().getDefaultLocale(rootCms, filename);
  
                          if (!content.hasLocale(locale)) {
                              // only remove property if the locale fits
                              continue;
                          }
                          if (content.hasValue(path, locale)) {
                              // value is available, property must be kept
                              continue;
                          }
                          // remove all existing permissions from the file
                          List<CmsAccessControlEntry> aces = rootCms.getAccessControlEntries(filename, false);
                          for (Iterator<CmsAccessControlEntry> j = aces.iterator(); j.hasNext();) {
                              CmsAccessControlEntry ace = j.next();
                              if (ace.getPrincipal().equals(CmsAccessControlEntry.PRINCIPAL_ALL_OTHERS_ID)) {
                                  // remove the entry "All others", which has to be treated in a special way
                                  rootCms.rmacc(
                                      filename,
                                      CmsAccessControlEntry.PRINCIPAL_ALL_OTHERS_NAME,
                                      CmsAccessControlEntry.PRINCIPAL_ALL_OTHERS_ID.toString());
                              } else {
                                  // this is a group or user principal
                                  I_CmsPrincipal principal = CmsPrincipal.readPrincipal(rootCms, ace.getPrincipal());
                                  if (principal.isGroup()) {
                                      rootCms.rmacc(filename, I_CmsPrincipal.PRINCIPAL_GROUP, principal.getName());
                                  } else if (principal.isUser()) {
                                      rootCms.rmacc(filename, I_CmsPrincipal.PRINCIPAL_USER, principal.getName());
                                  }
                              }
                          }
                      }
                  }
              }
          }
      }