code: private static InputStream transform(final TransformerFactory factory,
          final InputStream xml) throws TransformerException {
          final byte[] input;
          try {
              input = RsXslt.consume(xml);
          } catch (final IOException ex) {
              throw new IllegalStateException(ex);
          }
          final ByteArrayOutputStream baos = new ByteArrayOutputStream();
          final Source xsl = RsXslt.stylesheet(
              factory, new StreamSource(
                  new Utf8InputStreamContent(
                      new ByteArrayInputStream(new Utf8String(input).asBytes())
                  )
              )
          );
          RsXslt.transformer(factory, xsl).transform(
              new StreamSource(
                  new Utf8InputStreamContent(
                      new ByteArrayInputStream(new Utf8String(input).asBytes())
                  )
              ),
              new StreamResult(
                  new Utf8OutputStreamContent(baos)
              )
          );
          return new ByteArrayInputStream(
              new Utf8String(baos.toByteArray()).asBytes()
          );
      }
docs: Transform XML into HTML.
  @param factory Transformer factory
  @param xml XML page to be transformed.
  @return Resulting HTML page.
  @throws TransformerException If fails