Hi everyone! I'm working with xerces to transform XML to PDF using a XSL file. I have the following XML:
<comment content=" blablablabla
blablablabla" /> (The field "content" is written by an user of my application) When I try to transform the XML to PDF the newline doesn't appears. Do I miss something? Thanks! This is my java code: try { // configure fopFactory as desired FopFactory fopFactory = FopFactory.newInstance(); FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); // Setup output OutputStream out = new java.io.FileOutputStream(pdfFile); out = new java.io.BufferedOutputStream(out); try { // Construct fop with desired output format Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out); // Setup XSLT TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(new StreamSource(xsltfile)); // Set the value of a <param> in the stylesheet transformer.setParameter("versionParam", "2.0"); // Setup input for XSLT transformation Source src = new StreamSource(xmlPath); // Resulting SAX events (the generated FO) must be // piped through to FOP Result res = new SAXResult(fop.getDefaultHandler()); // Start XSLT transformation and FOP processing transformer.transform(src, res); } finally { out.close(); } } catch (Exception e) { e.printStackTrace(System.err); } --------------------------------------------------------------------- To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org For additional commands, e-mail: j-users-h...@xerces.apache.org