Path epubTemp = Files.createTempDirectory("epub");
TransformerFactory factory = new TransformerFactoryImpl();
File xslFile = configPath.resolve("docbook/epub3/chunk.xsl").toFile();
StreamSource xslSource = new StreamSource(xslFile);
Transformer transformer = factory.newTransformer(xslSource);
transformer.setParameter("base.dir", epubTemp.resolve("OEBPS").toString());
StreamSource xmlSource = new StreamSource(currentPath.resolve("book.xml").toFile());
transformer.transform(xmlSource, new StreamResult());
Path containerXml = epubTemp.resolve("META-INF/container.xml");