73 // Prepare the input and output files
74 Source source = new StreamSource(getClass().getResourceAsStream(inFilename));
75 // Result result = new StreamResult(new
76 // FileOutputStream(outFilename));
77 Result result = new StreamResult(sw);
78 // Apply the xsl file to the source file and write the result to the
79 // output file
80 xformer.transform(source, result);
81
82 String out = sw.toString();
83 if (out.indexOf("<p>") < 0) {
84 Assert.fail(out);
85 }
86 } catch (Exception e) {
87 // unexpected failure
88 e.printStackTrace();
89 Assert.fail(e.toString());
90 }
91 }
92 }
93
|
73 // Prepare the input and output files
74 Source source = new StreamSource(getClass().getResourceAsStream(inFilename));
75 // Result result = new StreamResult(new
76 // FileOutputStream(outFilename));
77 Result result = new StreamResult(sw);
78 // Apply the xsl file to the source file and write the result to the
79 // output file
80 xformer.transform(source, result);
81
82 String out = sw.toString();
83 if (out.indexOf("<p>") < 0) {
84 Assert.fail(out);
85 }
86 } catch (Exception e) {
87 // unexpected failure
88 e.printStackTrace();
89 Assert.fail(e.toString());
90 }
91 }
92 }
|