code: public void transform(Result result) {
      if (logger.isInfoEnabled())
        logger.info("Transforming source into result");
      try {
        if (content == null) {
          throw new IllegalStateException("No source to transform");
        }
  
        Transformer transformer = null;
        if (this.transformer != null) {
          transformer = getTransformer();
        } else {
          if (logger.isWarnEnabled())
            logger.warn("No transformer, so using identity transform");
          transformer = TransformerFactory.newInstance().newTransformer();
        }
  
        transformer.transform(content, result);
      } catch (TransformerException e) {
        logger.error("Failed to transform source into result",e);
        throw new MarkLogicIOException(e);
      }
    }
docs: Transforms the source for the content output to the result.  If
  the transformer is not specified, an identity transform sends
  the source to the result.  When writing, the result is stored
  in the database
  @param result	the receiver of the transform output