code: @Override
      public OutputStream call() {
          final Processor proc = new Processor(false);
          final XsltCompiler comp = proc.newXsltCompiler();
          XsltExecutable exp;
          XdmNode source;
  
          try {
              final Configuration config = proc.getUnderlyingConfiguration();
              final NodeInfo doc = new DocumentWrapper(mSession, config);
              exp = comp.compile(new StreamSource(mStylesheet));
              source = proc.newDocumentBuilder().build(doc);
  
              if (mSerializer == null) {
                  final Serializer out = new Serializer();
                  out.setOutputProperty(Serializer.Property.METHOD, "xml");
                  out.setOutputProperty(Serializer.Property.INDENT, "yes");
                  out.setOutputStream(mOut);
                  mSerializer = out;
              } else {
                  mSerializer.setOutputStream(mOut);
              }
  
              final XsltTransformer trans = exp.load();
              trans.setInitialContextNode(source);
              trans.setDestination(mSerializer);
              trans.transform();
          } catch (final SaxonApiException e) {
              LOGGER.error("Saxon exception: " + e.getMessage(), e);
          } catch (final TTException e) {
              LOGGER.error("TT exception: " + e.getMessage(), e);
          }
  
          return mOut;
      }
docs: {@inheritDoc}