aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaren Lease <klease@apache.org>2001-08-26 14:20:26 +0000
committerKaren Lease <klease@apache.org>2001-08-26 14:20:26 +0000
commitef152715ba9651e78cad58d0652ec4cedd0c50a1 (patch)
treea96c76e9ae41fea315b1d925a4b1842d653fc0c6 /src
parent7cd806f468cdfd0525dec7c93671942777d55ef4 (diff)
downloadxmlgraphics-fop-ef152715ba9651e78cad58d0652ec4cedd0c50a1.tar.gz
xmlgraphics-fop-ef152715ba9651e78cad58d0652ec4cedd0c50a1.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/org/apache/fop/tools/anttasks/Xslt.java14
1 files 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) {