klease      01/08/26 07:20:26

  Modified:    src/org/apache/fop/tools/anttasks Xslt.java
  Log:
  Only build the DOM if needed for mergefile. Otherwise pass input xml file directly 
to the Transformer so it can find the system ID
  
  Revision  Changes    Path
  1.4       +13 -3     xml-fop/src/org/apache/fop/tools/anttasks/Xslt.java
  
  Index: Xslt.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/tools/anttasks/Xslt.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Xslt.java 2001/07/30 20:29:35     1.3
  +++ Xslt.java 2001/08/26 14:20:26     1.4
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Xslt.java,v 1.3 2001/07/30 20:29:35 tore Exp $
  + * $Id: Xslt.java,v 1.4 2001/08/26 14:20:26 klease Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -155,14 +155,24 @@
        */
       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) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to