From ef152715ba9651e78cad58d0652ec4cedd0c50a1 Mon Sep 17 00:00:00 2001 From: Karen Lease Date: Sun, 26 Aug 2001 14:20:26 +0000 Subject: [PATCH] Only build the DOM if needed for mergefile. Otherwise pass input xml file directly to the Transformer so it can find the system ID git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194441 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/fop/tools/anttasks/Xslt.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/org/apache/fop/tools/anttasks/Xslt.java b/src/org/apache/fop/tools/anttasks/Xslt.java index 1bc56492a..ed660fa20 100644 --- a/src/org/apache/fop/tools/anttasks/Xslt.java +++ b/src/org/apache/fop/tools/anttasks/Xslt.java @@ -155,14 +155,24 @@ public class Xslt extends Task { */ private void transform() { try { - org.w3c.dom.Document source = buildDocument(infile); + org.w3c.dom.Document source = null; + if (mergefile != null && !mergefile.equals("")) { + source = buildDocument(infile); + } // Perform the transformation. System.out.println("============================"); System.out.println("xslt \nin: " + infile + "\nstyle: " + xsltfile + "\nout: " + outfile); System.out.println("============================"); - org.apache.fop.tools.xslt.XSLTransform.transform(source, + if (source != null) { + org.apache.fop.tools.xslt.XSLTransform.transform(source, xsltfile, outfile); + } + else { + // Read the xml file directly + org.apache.fop.tools.xslt.XSLTransform.transform(infile, + xsltfile, outfile); + } } catch (org.xml.sax.SAXException saxerror) { -- 2.39.5