Improve toFOP method: Parameterize the input stream and the EStandard input
This commit is contained in:
@@ -249,6 +249,12 @@ public class ZUGFeRDVisualizer {
|
||||
EStandard theStandard = findOutStandardFromRootNode(fis);
|
||||
fis = new FileInputStream(xmlFilename);//rewind :-(
|
||||
|
||||
return toFOP(fis, theStandard);
|
||||
}
|
||||
|
||||
protected String toFOP(InputStream is, EStandard theStandard)
|
||||
throws FileNotFoundException, TransformerException {
|
||||
|
||||
try {
|
||||
if (mXsltPDFTemplate == null) {
|
||||
mXsltPDFTemplate = mFactory.newTemplates(
|
||||
@@ -263,11 +269,11 @@ public class ZUGFeRDVisualizer {
|
||||
|
||||
//zf2 or fx
|
||||
if (theStandard == EStandard.facturx) {
|
||||
applyZF2XSLT(fis, iaos);
|
||||
applyZF2XSLT(is, iaos);
|
||||
} else if (theStandard == EStandard.ubl) {
|
||||
applyUBL2XSLT(fis, iaos);
|
||||
applyUBL2XSLT(is, iaos);
|
||||
} else if (theStandard == EStandard.ubl_creditnote) {
|
||||
applyUBLCreditNote2XSLT(fis, iaos);
|
||||
applyUBLCreditNote2XSLT(is, iaos);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user