docs: @Override
      public void execute() {
          logger = new DITAOTAntLogger(getProject());
          logger.info(message);
  
          new Properties();
          //ensure tempdir is absolute
          if (!tempdir.isAbsolute()) {
              tempdir = new File(basedir, tempdir.getPath()).getAbsoluteFile();
          }
          //ensure outdir is absolute
          if (!outputdir.isAbsolute()) {
              outputdir = new File(basedir, outputdir.getPath()).getAbsoluteFile();
          }
          //ensure inputmap is absolute
          if (!new File(inputmap).isAbsolute()) {
              inputmap = new File(tempdir, inputmap).getAbsolutePath();
          }
  
          final Job job = getJob(tempdir, getProject());
  
          final LangParser parser = new LangParser();
  
          try {
  
              final SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
              final SAXParser saxParser = saxParserFactory.newSAXParser();
              //parse the user input file(usually a map)
              saxParser.parse(inputmap, parser);
              String langCode = parser.getLangCode();
              if (!StringUtils.isEmptyString(langCode)) {
                  setActiveProjectProperty("htmlhelp.locale", langCode);
              } else {
                  //parse topic files
                  for (final FileInfo f: job.getFileInfo()) {
                      if (ATTR_FORMAT_VALUE_DITA.equals(f.format)) {
                          final File topicFile = new File(tempdir, f.file.getPath());
                          if (topicFile.exists()) {
                              saxParser.parse(topicFile, parser);
                              langCode = parser.getLangCode();
                              if (!StringUtils.isEmptyString(langCode)) {
                                  setActiveProjectProperty("htmlhelp.locale", langCode);
                                  break;
                              }
                          }
                      }
                  }
                  //no lang is set
                  if (StringUtils.isEmptyString(langCode)) {
                      //use default lang code
                      setActiveProjectProperty("htmlhelp.locale", "en-us");
                  }
              }
  
  
  
          } catch (final Exception e) {
              /* Since an exception is used to stop parsing when the search
               * is successful, catch the exception.
               */
              if (e.getMessage() != null &&
                      e.getMessage().equals("Search finished")) {
                  System.out.println("Lang search finished");
              } else {
                  e.printStackTrace();
              }
          }
      }