Merge pull request #547 from taskinkemal/master
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);
|
EStandard theStandard = findOutStandardFromRootNode(fis);
|
||||||
fis = new FileInputStream(xmlFilename);//rewind :-(
|
fis = new FileInputStream(xmlFilename);//rewind :-(
|
||||||
|
|
||||||
|
return toFOP(fis, theStandard);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected String toFOP(InputStream is, EStandard theStandard)
|
||||||
|
throws FileNotFoundException, TransformerException {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (mXsltPDFTemplate == null) {
|
if (mXsltPDFTemplate == null) {
|
||||||
mXsltPDFTemplate = mFactory.newTemplates(
|
mXsltPDFTemplate = mFactory.newTemplates(
|
||||||
@@ -263,11 +269,11 @@ public class ZUGFeRDVisualizer {
|
|||||||
|
|
||||||
//zf2 or fx
|
//zf2 or fx
|
||||||
if (theStandard == EStandard.facturx) {
|
if (theStandard == EStandard.facturx) {
|
||||||
applyZF2XSLT(fis, iaos);
|
applyZF2XSLT(is, iaos);
|
||||||
} else if (theStandard == EStandard.ubl) {
|
} else if (theStandard == EStandard.ubl) {
|
||||||
applyUBL2XSLT(fis, iaos);
|
applyUBL2XSLT(is, iaos);
|
||||||
} else if (theStandard == EStandard.ubl_creditnote) {
|
} else if (theStandard == EStandard.ubl_creditnote) {
|
||||||
applyUBLCreditNote2XSLT(fis, iaos);
|
applyUBLCreditNote2XSLT(is, iaos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user