docs: @Override
      public AbstractPipelineOutput execute(final AbstractPipelineInput input) throws DITAOTException {
          final FileInfo fi = job.getFileInfo(f -> f.isInput).iterator().next();
          if (!ATTR_FORMAT_VALUE_DITAMAP.equals(fi.format)) {
              return null;
          }
          final File inputFile = new File(job.tempDirURI.resolve(fi.uri));
          final File styleFile = new File(input.getAttribute(ANT_INVOKER_EXT_PARAM_STYLE));
  
          Document doc;
          InputStream in = null;
          try {
              doc = XMLUtils.getDocumentBuilder().newDocument();
              final TransformerFactory transformerFactory = TransformerFactory.newInstance();
              transformerFactory.setURIResolver(CatalogUtils.getCatalogResolver());
              final Transformer transformer = withLogger(transformerFactory.newTransformer(new StreamSource(styleFile)), logger);
              transformer.setURIResolver(CatalogUtils.getCatalogResolver());
              if (input.getAttribute("include.rellinks") != null) {
                  transformer.setParameter("include.rellinks", input.getAttribute("include.rellinks"));
              }
              transformer.setParameter("INPUTMAP", job.getInputMap());
              in = new BufferedInputStream(new FileInputStream(inputFile));
              final Source source = new StreamSource(in);
              source.setSystemId(inputFile.toURI().toString());
              final DOMResult result = new DOMResult(doc);
              transformer.transform(source, result);
          } catch (final RuntimeException e) {
              throw e;
          } catch (final Exception e) {
              throw new DITAOTException("Failed to read links from " + inputFile + ": " + e.getMessage(), e);
          } finally {
              if (in != null) {
                  try {
                      in.close();
                  } catch (final IOException e) {
                      logger.error("Failed to close input stream: " + e.getMessage(), e);
                  }
              }
          }
  
          final Map<File, Map<String, Element>> mapSet = getMapping(doc);
  
          if (!mapSet.isEmpty()) {
              final DitaLinksWriter linkInserter = new DitaLinksWriter();
              linkInserter.setLogger(logger);
              linkInserter.setJob(job);
              for (final Map.Entry<File, Map<String, Element>> entry: mapSet.entrySet()) {
                  final URI uri = inputFile.toURI().resolve(toURI(entry.getKey().getPath()));
                  logger.info("Processing " + uri);
                  linkInserter.setLinks(entry.getValue());
                  linkInserter.setCurrentFile(uri);
                  try {
                      linkInserter.write(new File(uri));
                  } catch (final DITAOTException e) {
                      logger.error("Failed to insert links: " + e.getMessage(), e);
                  }
              }
          }
          return null;
      }