code: private void chunkMap(final Element root) {
          // create the reference to the new file on root element.
          String newFilename = replaceExtension(new File(currentFile).getName(), FILE_EXTENSION_DITA);
          URI newFile = currentFile.resolve(newFilename);
          if (new File(newFile).exists()) {
              final URI oldFile = newFile;
              newFilename = chunkFilenameGenerator.generateFilename(CHUNK_PREFIX, FILE_EXTENSION_DITA);
              newFile = currentFile.resolve(newFilename);
              // Mark up the possible name changing, in case that references might be updated.
              conflictTable.put(newFile, oldFile.normalize());
          }
          changeTable.put(newFile, newFile);
  
          // change the class attribute to "topicref"
          final String origCls = root.getAttribute(ATTRIBUTE_NAME_CLASS);
          root.setAttribute(ATTRIBUTE_NAME_CLASS, origCls + MAP_TOPICREF.matcher);
          root.setAttribute(ATTRIBUTE_NAME_HREF, toURI(newFilename).toString());
  
          createTopicStump(newFile);
  
          // process chunk
          processTopicref(root);
  
          // restore original root element
          if (origCls != null) {
              root.setAttribute(ATTRIBUTE_NAME_CLASS, origCls);
          }
          root.removeAttribute(ATTRIBUTE_NAME_HREF);
      }
docs: Process map when "to-content" is specified on map element.
  <p>
  TODO: Instead of reclassing map element to be a topicref, add a topicref
  into the map root and move all map content into that topicref.