77 properties.put("omit-xml-declaration", "yes"); 78 properties.put("{http://xml.apache.org/xslt}indent-amount", "0"); 79 properties.put("indent", "no"); 80 properties.put("standalone", "no"); 81 properties.put("version", "1.0"); 82 properties.put("media-type", "text/xml"); 83 84 DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); 85 dbf.setNamespaceAware(true); 86 DOMSource domSource = new DOMSource(dbf.newDocumentBuilder(). 87 parse(new File(xsltFile))); 88 89 Transformer transformer = TransformerFactory.newInstance(). 90 newTransformer(domSource); 91 transformer.setOutputProperties(properties); 92 transformer.transform(new StreamSource(fis), new StreamResult(fos)); 93 } 94 assertTrue(compareWithGold(goldFile, outputFile)); 95 } 96 } 97 98 | 77 properties.put("omit-xml-declaration", "yes"); 78 properties.put("{http://xml.apache.org/xslt}indent-amount", "0"); 79 properties.put("indent", "no"); 80 properties.put("standalone", "no"); 81 properties.put("version", "1.0"); 82 properties.put("media-type", "text/xml"); 83 84 DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); 85 dbf.setNamespaceAware(true); 86 DOMSource domSource = new DOMSource(dbf.newDocumentBuilder(). 87 parse(new File(xsltFile))); 88 89 Transformer transformer = TransformerFactory.newInstance(). 90 newTransformer(domSource); 91 transformer.setOutputProperties(properties); 92 transformer.transform(new StreamSource(fis), new StreamResult(fos)); 93 } 94 assertTrue(compareWithGold(goldFile, outputFile)); 95 } 96 } |