cvs commit: xml-fop/src/org/apache/fop/tools/anttasks Fop.java

2003-10-17 Thread gmazza
gmazza  2003/10/17 15:21:09

  Modified:src/org/apache/fop/tools/anttasks Tag: fop-0_20_2-maintain
Fop.java
  Log:
  Addition of force attribute to ant task in maintenance branch.
  Submitted by: Sean Gilligan (Bug 21380).
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.14.2.9  +52 -9 xml-fop/src/org/apache/fop/tools/anttasks/Attic/Fop.java
  
  Index: Fop.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/tools/anttasks/Attic/Fop.java,v
  retrieving revision 1.14.2.8
  retrieving revision 1.14.2.9
  diff -u -r1.14.2.8 -r1.14.2.9
  --- Fop.java  25 Feb 2003 15:19:58 -  1.14.2.8
  +++ Fop.java  17 Oct 2003 22:21:08 -  1.14.2.9
  @@ -105,6 +105,7 @@
   File userConfig;
   int messageType = Project.MSG_VERBOSE;
   boolean logFiles = true;
  +private boolean force = false;
   
   /**
* Sets the input file
  @@ -137,6 +138,24 @@
   }
   
   /**
  + * Set whether to check dependencies, or to always generate;
  + * optional, default is false.
  + *
  + * @param force true if always generate.
  + */
  +public void setForce(boolean force) {
  +this.force = force;
  +}
  +
  +/**
  + * Gets the force attribute
  + * @return the force attribute
  + */
  +public boolean getForce() {
  +return force;
  +}
  +
  +/**
* Sets the output file
* @param File to output to
*/
  @@ -357,7 +376,10 @@
   int rint = determineRenderer(task.getFormat());
   String newExtension = determineExtension(rint);
   
  +// actioncount = # of fofiles actually processed through FOP
   int actioncount = 0;
  +// skippedcount = # of fofiles which haven't changed (force = false)
  +int skippedcount = 0; 
   
   // deal with single source file
   if (task.getFofile() != null) {
  @@ -369,8 +391,17 @@
   if (task.getOutdir() != null) {
   outf = new File(task.getOutdir(), outf.getName());
   }
  -render(task.getFofile(), outf, rint);
  -actioncount++;
  +
  +// Render if force flag is set OR 
  +// OR output file doesn't exist OR
  +// output file is older than input file
  +if (task.getForce() || !outf.exists() 
  +|| (task.getFofile().lastModified()  outf.lastModified() )) {
  +render(task.getFofile(), outf, rint);
  +actioncount++;
  +} else if (outf.exists()  (task.getFofile().lastModified() = 
outf.lastModified() )) {
  +skippedcount++;
  +}
   }
   }
   
  @@ -413,15 +444,27 @@
   task.log(Error setting base directory:  + e, Project.MSG_ERR);
   }
   
  -render(f, outf, rint);
  -actioncount++;
  +// Render if force flag is set OR 
  +// OR output file doesn't exist OR
  +// output file is older than input file
  +if (task.getForce() || !outf.exists() 
  +|| (f.lastModified()  outf.lastModified() )) {
  +render(f, outf, rint);
  +actioncount++;
  +} else if (outf.exists()  (f.lastModified() = 
outf.lastModified() )) {
  +skippedcount++;
  +}
  +
   }
   }
   
  -if (actioncount == 0) {
  -task.log(
  -  No files processed. No files were selected by the filesets and no 
fofile was set. ,
  -  Project.MSG_WARN);
  +if (actioncount + skippedcount == 0) {
  +task.log(No files processed. No files were selected by the filesets 
  ++ and no fofile was set. , Project.MSG_WARN);
  +} else if (skippedcount  0) {  
  +task.log(skippedcount +  xslfo file(s) skipped (no change found
  ++  since last generation; set force=\true\ to override).
  +, Project.MSG_INFO);
   }
   }
   
  
  
  

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



cvs commit: xml-fop/src/org/apache/fop/tools/anttasks Fop.java

2003-02-14 Thread jeremias
jeremias2003/02/14 01:49:31

  Modified:src/org/apache/fop/tools/anttasks Fop.java
  Log:
  FOP Ant task: Fix for logging behaviour, fix for directory structure preservation 
for nested filesets and additional attribute logFiles.
  Submitted by: Stefan Wachter [EMAIL PROTECTED]
  
  Fix checkstyle errors.
  Submitted
  
  Revision  ChangesPath
  1.23  +188 -93   xml-fop/src/org/apache/fop/tools/anttasks/Fop.java
  
  Index: Fop.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/tools/anttasks/Fop.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- Fop.java  31 Oct 2002 17:26:05 -  1.22
  +++ Fop.java  14 Feb 2003 09:49:31 -  1.23
  @@ -1,6 +1,6 @@
   /*
* $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  + * Copyright (C) 2001-2003 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
*/
  @@ -8,18 +8,22 @@
   package org.apache.fop.tools.anttasks;
   
   // Ant
  -import org.apache.tools.ant.*;
  +import org.apache.tools.ant.BuildException;
  +import org.apache.tools.ant.DirectoryScanner;
  +import org.apache.tools.ant.Project;
  +import org.apache.tools.ant.Task;
   import org.apache.tools.ant.types.FileSet;
  +import org.apache.tools.ant.util.GlobPatternMapper;
   
   // SAX
   import org.xml.sax.XMLReader;
  -import org.xml.sax.InputSource;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXParseException;
   
   // Java
  -import java.io.*;
  -import java.util.*;
  +import java.io.File;
  +import java.io.IOException;
  +import java.io.OutputStream;
  +import java.net.MalformedURLException;
  +import java.util.List;
   
   // FOP
   import org.apache.fop.apps.Starter;
  @@ -34,96 +38,124 @@
   import org.apache.avalon.framework.logger.Logger;
   
   /**
  - * Wrapper for Fop which allows it to be accessed from within an Ant task.
  + * Wrapper for FOP which allows it to be accessed from within an Ant task.
* Accepts the inputs:
* ul
* lifofile - formatting objects file to be transformed/li
* liformat - MIME type of the format to generate ex. application/pdf/li
* lioutfile - output filename/li
* libaseDir - directory to work from/li
  - * liuserconfig - file with user configuration (same as the -c command line 
option)/li
  - * limessagelevel - (info | verbose | debug) level to output non-error 
messages/li
  + * liuserconfig - file with user configuration (same as the -c command 
  + *  line option)/li
  + * limessagelevel - (error | warn | info | verbose | debug) level to output 
  + *  non-error messages/li
  + * lilogFiles - Controls whether the names of the files that are processed 
  + *  are logged or not/li
* /ul
*/
   public class Fop extends Task {
  -File foFile;
  -ArrayList filesets = new ArrayList();
  -File outFile;
  -File outDir;
  -String format; //MIME type
  -File baseDir;
  -File userConfig;
  -int messageType = Project.MSG_VERBOSE;
  +
  +private File foFile;
  +private List filesets = new java.util.ArrayList();
  +private File outFile;
  +private File outDir;
  +private String format; //MIME type
  +private File baseDir;
  +private File userConfig;
  +private int messageType = Project.MSG_VERBOSE;
  +private boolean logFiles = true;
   
   /**
  - * Sets the input file
  - * @param File to input from
  + * Sets the filename for the userconfig.xml.
  + * @param userConfig Configuration to use
*/
  -public void setUserconfig (File userConfig) {
  +public void setUserconfig(File userConfig) {
   this.userConfig = userConfig;
   }
   
   /**
  - * Sets the input file
  - * @param File to input from
  + * Returns the file for the userconfig.xml.
  + * @return the userconfig.xml file
  + */
  +public File getUserconfig() {
  +return this.userConfig;
  +}
  +
  +/**
  + * Sets the input XSL-FO file.
  + * @param foFile input XSL-FO file
*/
   public void setFofile(File foFile) {
   this.foFile = foFile;
   }
   
   /**
  - * Gets the input file
  + * Gets the input XSL-FO file.
  + * @return input XSL-FO file
*/
   public File getFofile() {
   return foFile;
   }
   
   /**
  - * Adds a set of fo files (nested fileset attribute).
  + * Adds a set of XSL-FO files (nested fileset attribute).
  + * @param set a fileset
*/
   public void addFileset(FileSet set) {
   filesets.add(set);
   }
  +
  +/**
  + * Returns the current list of filesets.
  + * @return the filesets
  + */
  +public List getFilesets() {
  +return this.filesets;
  +

cvs commit: xml-fop/src/org/apache/fop/tools/anttasks Fop.java

2003-02-13 Thread jeremias
jeremias2003/02/13 23:59:07

  Modified:src/org/apache/fop/tools/anttasks Tag: fop-0_20_2-maintain
Fop.java
  Log:
  FOP Ant task: Fix for logging behaviour, fix for directory structure preservation 
for nested filesets and additional attribute logFiles.
  Submitted by: Stefan Wachter [EMAIL PROTECTED]
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.14.2.7  +71 -29xml-fop/src/org/apache/fop/tools/anttasks/Fop.java
  
  Index: Fop.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/tools/anttasks/Fop.java,v
  retrieving revision 1.14.2.6
  retrieving revision 1.14.2.7
  diff -u -r1.14.2.6 -r1.14.2.7
  --- Fop.java  18 Nov 2002 14:37:46 -  1.14.2.6
  +++ Fop.java  14 Feb 2003 07:59:07 -  1.14.2.7
  @@ -1,6 +1,6 @@
   /*
* $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  + * Copyright (C) 2001-2003 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
*/
  @@ -8,21 +8,23 @@
   package org.apache.fop.tools.anttasks;
   
   // Ant
  -import org.apache.tools.ant.*;
  +import org.apache.tools.ant.BuildException;
  +import org.apache.tools.ant.DirectoryScanner;
  +import org.apache.tools.ant.Project;
  +import org.apache.tools.ant.Task;
   import org.apache.tools.ant.types.FileSet;
   
   // SAX
   import org.xml.sax.XMLReader;
  -import org.xml.sax.InputSource;
  -import org.xml.sax.SAXException;
  -import org.xml.sax.SAXParseException;
   
   // Java
  -import java.io.*;
  -import java.util.*;
  +import java.io.File;
  +import java.io.OutputStream;
  +import java.util.List;
  +import java.util.Map;
   
   // FOP
  -import org.apache.fop.messaging.*;
  +import org.apache.fop.messaging.MessageHandler;
   import org.apache.fop.apps.Options;
   import org.apache.fop.apps.Starter;
   import org.apache.fop.apps.InputHandler;
  @@ -34,6 +36,7 @@
   // Avalon
   import org.apache.avalon.framework.logger.ConsoleLogger;
   import org.apache.avalon.framework.logger.Logger;
  +import org.apache.tools.ant.util.GlobPatternMapper;
   
   /**
* Wrapper for Fop which allows it to be accessed from within an Ant task.
  @@ -44,18 +47,21 @@
* lioutfile - output filename/li
* libaseDir - directory to work from/li
* liuserconfig - file with user configuration (same as the -c command line 
option)/li
  - * limessagelevel - (info | verbose | debug) level to output non-error 
messages/li
  + * limessagelevel - (error | warn | info | verbose | debug) level to output 
non-error messages/li
  + * lilogFiles - Controls whether the names of the files that are processed are 
logged or not/li
* /ul
*/
   public class Fop extends Task {
  +
   File foFile;
  -ArrayList filesets = new ArrayList();
  +List filesets = new java.util.ArrayList();
   File outFile;
   File outDir;
   String format; //MIME type
   File baseDir;
   File userConfig;
   int messageType = Project.MSG_VERBOSE;
  +boolean logFiles = true;
   
   /**
* Sets the input file
  @@ -142,6 +148,10 @@
   messageType = Project.MSG_VERBOSE;
   } else if (messageLevel.equalsIgnoreCase(debug)) {
   messageType = Project.MSG_DEBUG;
  +} else if (messageLevel.equalsIgnoreCase(err) || 
messageLevel.equalsIgnoreCase(error)) {
  +messageType = Project.MSG_ERR;
  +} else if (messageLevel.equalsIgnoreCase(warn)) {
  +messageType = Project.MSG_WARN;
   } else {
   log(messagelevel set to unknown value \ + messageLevel +
   \, Project.MSG_ERR);
  @@ -173,11 +183,33 @@
   }
   
   /**
  + * Controls whether the filenames of the files that are processed are logged
  + * or not.
  + */
  +public void setLogFiles(boolean aBoolean) {
  +logFiles = aBoolean;
  +}
  +
  +public boolean getLogFiles() {
  +return logFiles;
  +}
  +
  +/**
* Starts execution of this task
*/
   public void execute() throws BuildException {
  +int logLevel = ConsoleLogger.LEVEL_INFO;
  +switch (getMessageType()) {
  +case Project.MSG_DEBUG  : logLevel = ConsoleLogger.LEVEL_DEBUG; break;
  +case Project.MSG_INFO   : logLevel = ConsoleLogger.LEVEL_INFO; break;
  +case Project.MSG_WARN   : logLevel = ConsoleLogger.LEVEL_WARN; break;
  +case Project.MSG_ERR: logLevel = ConsoleLogger.LEVEL_ERROR; break;
  +case Project.MSG_VERBOSE: logLevel = ConsoleLogger.LEVEL_DEBUG; break;
  +}
  +Logger log = new ConsoleLogger(logLevel);
  +MessageHandler.setScreenLogger(log);
   try {
  -Starter starter = new 

cvs commit: xml-fop/src/org/apache/fop/tools/anttasks Fop.java

2002-10-31 Thread bdelacretaz
bdelacretaz2002/10/31 09:26:05

  Modified:src/org/apache/fop/apps CommandLineOptions.java Driver.java
   src/org/apache/fop/tools/anttasks Fop.java
  Log:
  rtf renderer selection mechanism added, no rtf renderer yet
  
  Revision  ChangesPath
  1.20  +21 -2 xml-fop/src/org/apache/fop/apps/CommandLineOptions.java
  
  Index: CommandLineOptions.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/CommandLineOptions.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- CommandLineOptions.java   4 Sep 2002 08:36:35 -   1.19
  +++ CommandLineOptions.java   31 Oct 2002 17:26:04 -  1.20
  @@ -50,6 +50,8 @@
   private static final int SVG_OUTPUT = 8;
   /* output: XML area tree */
   private static final int AREA_OUTPUT = 9;
  +/* output: RTF file */
  +private static final int RTF_OUTPUT = 10;
   
   /* show configuration information */
   Boolean dumpConfiguration = Boolean.FALSE;
  @@ -184,6 +186,15 @@
   outfile = new File(args[i + 1]);
   i++;
   }
  +} else if (args[i].equals(-rtf)) {
  +setOutputMode(RTF_OUTPUT);
  +if ((i + 1 == args.length)
  +|| (args[i + 1].charAt(0) == '-')) {
  +throw new FOPException(you must specify the rtf output file);
  +} else {
  +outfile = new File(args[i + 1]);
  +i++;
  +}
   } else if (args[i].equals(-print)) {
   setOutputMode(PRINT_OUTPUT);
   // show print help
  @@ -347,6 +358,8 @@
   case AREA_OUTPUT:
   rendererOptions.put(fineDetail, isCoarseAreaXml());
   return Driver.RENDER_XML;
  +case RTF_OUTPUT:
  +return Driver.RENDER_RTF;
   default:
   throw new FOPException(Invalid Renderer setting!);
   }
  @@ -471,7 +484,7 @@
* shows the commandline syntax including a summary of all available options 
and some examples
*/
   public static void printUsage() {
  -System.err.println(\nUSAGE\nFop [options] [-fo|-xml] infile [-xsl file] 
[-awt|-pdf|-mif|-pcl|-ps|-txt|-at|-print] outfile\n
  +System.err.println(\nUSAGE\nFop [options] [-fo|-xml] infile [-xsl file] 
[-awt|-pdf|-mif|-rtf|-pcl|-ps|-txt|-at|-print] outfile\n
  +  [OPTIONS]  \n
  +   -d  debug mode   \n
  +   -x  dump configuration settings  \n
  @@ -489,6 +502,7 @@
  +   -pdf outfile  input will be rendered as pdf 
file (outfile req'd) \n
  +   -awt  input will be displayed on 
screen \n
  +   -mif outfile  input will be rendered as mif 
file (outfile req'd)\n
  +   +   -rtf outfile  input will be rendered as rtf 
file (outfile req'd)\n
  +   -pcl outfile  input will be rendered as pcl 
file (outfile req'd) \n
  +   -ps outfile   input will be rendered as 
PostScript file (outfile req'd) \n
  +   -txt outfile  input will be rendered as 
text file (outfile req'd) \n
  @@ -500,6 +514,7 @@
  +   Fop -fo foo.fo -pdf foo.pdf (does the same as 
the previous line)\n
  +   Fop -xsl foo.xsl -xml foo.xml -pdf foo.pdf\n
  +   Fop foo.fo -mif foo.mif\n
  +   +   Fop foo.fo -rtf foo.rtf\n
  +   Fop foo.fo -print or Fop -print foo.fo \n
  +   Fop foo.fo -awt \n);
   }
  @@ -554,6 +569,10 @@
   break;
   case MIF_OUTPUT:
   log.debug(mif);
  +log.debug(output file:  + outfile.toString());
  +break;
  +case RTF_OUTPUT:
  +log.debug(rtf);
   log.debug(output file:  + outfile.toString());
   break;
   case PRINT_OUTPUT:
  
  
  
  1.56  +10 -1 xml-fop/src/org/apache/fop/apps/Driver.java
  
  Index: Driver.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/Driver.java,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- Driver.java   25 Oct 2002 09:29:39 -  1.55
  +++ Driver.java   31 Oct 2002 17:26:04 -  1.56
  @@ -135,6 +135,11 @@
   public static final int RENDER_SVG = 9;
   
   /**
  + * Render to RTF. OutputStream must be set
  + */
  +public static final 

cvs commit: xml-fop/src/org/apache/fop/tools/anttasks Fop.java

2002-07-16 Thread pbwest

pbwest  2002/07/16 07:01:53

  Modified:src/org/apache/fop/tools/anttasks Tag: fop-0_20_2-maintain
Fop.java
  Log:
  Changed rendererOptions from Hashtable to HashMap
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.14.2.4  +2 -2  xml-fop/src/org/apache/fop/tools/anttasks/Fop.java
  
  Index: Fop.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/tools/anttasks/Fop.java,v
  retrieving revision 1.14.2.3
  retrieving revision 1.14.2.4
  diff -u -r1.14.2.3 -r1.14.2.4
  --- Fop.java  25 Mar 2002 18:08:28 -  1.14.2.3
  +++ Fop.java  16 Jul 2002 14:01:53 -  1.14.2.4
  @@ -349,7 +349,7 @@
   driver.setLogger(log);
   driver.setRenderer(renderer);
if (renderer == Driver.RENDER_XML) {
  - Hashtable rendererOptions = new Hashtable();
  + HashMap rendererOptions = new HashMap();
rendererOptions.put(fineDetail, new Boolean(true));
driver.getRenderer().setOptions(rendererOptions);
}
  
  
  

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




cvs commit: xml-fop/src/org/apache/fop/tools/anttasks Fop.java

2002-03-21 Thread chrisg

chrisg  02/03/21 09:18:05

  Modified:docs/examples/embedding Tag: fop-0_20_2-maintain
FopPrintServlet.java FopServlet.java
   src/org/apache/fop/apps Tag: fop-0_20_2-maintain
CommandLineOptions.java
   src/org/apache/fop/datatypes Tag: fop-0_20_2-maintain
ToBeImplementedProperty.java
   src/org/apache/fop/messaging Tag: fop-0_20_2-maintain
MessageHandler.java
   src/org/apache/fop/tools Tag: fop-0_20_2-maintain
TestConverter.java
   src/org/apache/fop/tools/anttasks Tag: fop-0_20_2-maintain
Fop.java
  Log:
  changed MessageHandler and servlet examples to use
  org.apache.avalon.framework.logger.Logger
  
  Submitted by: Michael Gratton [EMAIL PROTECTED]
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.3   +8 -8  xml-fop/docs/examples/embedding/Attic/FopPrintServlet.java
  
  Index: FopPrintServlet.java
  ===
  RCS file: /home/cvs/xml-fop/docs/examples/embedding/Attic/FopPrintServlet.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- FopPrintServlet.java  1 Mar 2002 12:44:39 -   1.1.2.2
  +++ FopPrintServlet.java  21 Mar 2002 17:18:05 -  1.1.2.3
  @@ -1,5 +1,5 @@
   /*
  - * $Id: FopPrintServlet.java,v 1.1.2.2 2002/03/01 12:44:39 chrisg Exp $
  + * $Id: FopPrintServlet.java,v 1.1.2.3 2002/03/21 17:18:05 chrisg Exp $
* Copyright (C) 2002 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
  @@ -21,10 +21,12 @@
   import org.apache.fop.layout.Page;
   import org.apache.fop.apps.Version;
   import org.apache.fop.apps.XSLTInputHandler;
  +import org.apache.fop.messaging.MessageHandler;
   
   import org.apache.fop.render.awt.AWTRenderer ;
   
  -import org.apache.log.*;
  +import org.apache.avalon.framework.logger.ConsoleLogger;
  +import org.apache.avalon.framework.logger.Logger;
   
   /**
* Example servlet to generate a fop printout from a servlet.
  @@ -40,13 +42,12 @@
* - servlet_2_2.jar
* - fop.jar
* - sax api
  - * - logkit jar
  + * - avalon-framework-x.jar (where x is the version found the FOP lib dir)
*
* Running: you will need in the WEB-INF/lib/ directory:
* - fop.jar
* - batik.jar
  - * - avalon-framework-4.0.jar
  - * - logkit-1.0.jar
  + * - avalon-framework-x.jar (where x is the version found the FOP lib dir)
* - xalan-2.0.0.jar
*/

  @@ -62,9 +63,8 @@
 {
   if (log == null) 
 {
  -Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
  -log = hierarchy.getLoggerFor(fop);
  -log.setPriority(Priority.WARN);
  +  log = new ConsoleLogger(ConsoleLogger.LEVEL_WARN);
  +  MessageHandler.setScreenLogger(log);
 }
   
   try  
  
  
  
  1.4.2.2   +8 -8  xml-fop/docs/examples/embedding/FopServlet.java
  
  Index: FopServlet.java
  ===
  RCS file: /home/cvs/xml-fop/docs/examples/embedding/FopServlet.java,v
  retrieving revision 1.4.2.1
  retrieving revision 1.4.2.2
  diff -u -r1.4.2.1 -r1.4.2.2
  --- FopServlet.java   1 Mar 2002 12:44:39 -   1.4.2.1
  +++ FopServlet.java   21 Mar 2002 17:18:05 -  1.4.2.2
  @@ -1,5 +1,5 @@
   /*
  - * $Id: FopServlet.java,v 1.4.2.1 2002/03/01 12:44:39 chrisg Exp $
  + * $Id: FopServlet.java,v 1.4.2.2 2002/03/21 17:18:05 chrisg 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.
  @@ -16,8 +16,10 @@
   import org.apache.fop.apps.Driver;
   import org.apache.fop.apps.Version;
   import org.apache.fop.apps.XSLTInputHandler;
  +import org.apache.fop.messaging.MessageHandler;
   
  -import org.apache.log.*;
  +import org.apache.avalon.framework.logger.ConsoleLogger;
  +import org.apache.avalon.framework.logger.Logger;
   
   /**
* Example servlet to generate a PDF from a servlet.
  @@ -32,14 +34,13 @@
* - servlet_2_2.jar
* - fop.jar
* - sax api
  - * - logkit jar
  + * - avalon-framework-x.jar (where x is the version found the FOP lib dir)
*
* Running: you will need in the WEB-INF/lib/ directory:
* - fop.jar
* - batik.jar
  - * - avalon-framework-4.0.jar
  - * - logkit-1.0.jar
* - xalan-2.0.0.jar
  + * - avalon-framework-x.jar (where x is the version found the FOP lib dir)
*/
   public class FopServlet extends HttpServlet {
   public static final String FO_REQUEST_PARAM = fo;
  @@ -50,9 +51,8 @@
   public void doGet(HttpServletRequest request,
  

cvs commit: xml-fop/src/org/apache/fop/tools/anttasks Fop.java

2002-03-17 Thread chrisg

chrisg  02/03/17 15:37:08

  Modified:.Tag: fop-0_20_2-maintain CHANGES build.bat build.sh
build.xml fop.bat
   docs/examples Tag: fop-0_20_2-maintain runtests.bat
runtests.sh
   src/org/apache/fop/apps Tag: fop-0_20_2-maintain
CommandLineOptions.java CommandLineStarter.java
Driver.java Starter.java StreamRenderer.java
   src/org/apache/fop/datatypes Tag: fop-0_20_2-maintain
ToBeImplementedProperty.java
   src/org/apache/fop/fo Tag: fop-0_20_2-maintain FONode.java
FOTreeBuilder.java Property.java
   src/org/apache/fop/fo/pagination Tag: fop-0_20_2-maintain
PageNumberGenerator.java
   src/org/apache/fop/messaging Tag: fop-0_20_2-maintain
MessageHandler.java
   src/org/apache/fop/render Tag: fop-0_20_2-maintain
AbstractRenderer.java Renderer.java
   src/org/apache/fop/render/ps Tag: fop-0_20_2-maintain
PSRenderer.java
   src/org/apache/fop/render/xml Tag: fop-0_20_2-maintain
XMLRenderer.java
   src/org/apache/fop/svg Tag: fop-0_20_2-maintain
SVGUserAgent.java
   src/org/apache/fop/tools Tag: fop-0_20_2-maintain
TestConverter.java
   src/org/apache/fop/tools/anttasks Tag: fop-0_20_2-maintain
Fop.java
  Added:   lib  Tag: fop-0_20_2-maintain
avalon-framework-cvs-20020315.jar
  Removed: lib  Tag: fop-0_20_2-maintain avalon-framework-4.0.jar
logkit-1.0.jar logkit.LICENSE.txt
  Log:
  Moved from org.apache.log.Logger to org.apache.avalon.framework.logger.Logger
  (this removes dependency from logkit)
  Submitted by: Michael Gratton [EMAIL PROTECTED]
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.10.2.9  +7 -0  xml-fop/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/xml-fop/CHANGES,v
  retrieving revision 1.10.2.8
  retrieving revision 1.10.2.9
  diff -u -r1.10.2.8 -r1.10.2.9
  --- CHANGES   1 Mar 2002 12:44:39 -   1.10.2.8
  +++ CHANGES   17 Mar 2002 23:37:06 -  1.10.2.9
  @@ -1,4 +1,11 @@
   ==
  +Done since 0.20.3 release
  +
  +- Moved from org.apache.log.Logger to org.apache.avalon.framework.logger.Logger
  +  (this removes dependency from logkit)
  +  Submitted by: Michael Gratton [EMAIL PROTECTED]
  +
  +==
   Done since 0.20.2 release
   *** General
   - Added correct metrics for euro sign in standard fonts
  
  
  
  1.14.2.3  +1 -1  xml-fop/build.bat
  
  Index: build.bat
  ===
  RCS file: /home/cvs/xml-fop/build.bat,v
  retrieving revision 1.14.2.2
  retrieving revision 1.14.2.3
  diff -u -r1.14.2.2 -r1.14.2.3
  --- build.bat 1 Mar 2002 12:44:39 -   1.14.2.2
  +++ build.bat 17 Mar 2002 23:37:06 -  1.14.2.3
  @@ -7,7 +7,7 @@
   
   set LIBDIR=lib
   set 
LOCALCLASSPATH=%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\classes.zip;%LIBDIR%\ant.jar;%LIBDIR%\ant-1.3-optional.jar;%LIBDIR%\batik.jar;%LIBDIR%\buildtools.jar;%LIBDIR%\xerces-1.2.3.jar;%LIBDIR%\xalan-2.0.0.jar;%LIBDIR%\xalanj1compat.jar;%LIBDIR%\bsf.jar

  -set 
LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jimi-1.0.jar;%LIBDIR%\logkit-1.0.jar;%LIBDIR%\avalon-framework-4.0.jar

  +set 
LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jimi-1.0.jar;%LIBDIR%\avalon-framework-cvs-20020315.jar

   
   set ANT_HOME=%LIBDIR%
   
  
  
  
  1.15.2.3  +1 -1  xml-fop/build.sh
  
  Index: build.sh
  ===
  RCS file: /home/cvs/xml-fop/build.sh,v
  retrieving revision 1.15.2.2
  retrieving revision 1.15.2.3
  diff -u -r1.15.2.2 -r1.15.2.3
  --- build.sh  1 Mar 2002 12:44:39 -   1.15.2.2
  +++ build.sh  17 Mar 2002 23:37:06 -  1.15.2.3
  @@ -14,7 +14,7 @@
   fi
   LIBDIR=lib
   
LOCALCLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/classes.zip:$LIBDIR/ant.jar:$LIBDIR/ant-1.3-optional.jar:$LIBDIR/batik.jar:$LIBDIR/buildtools.jar:$LIBDIR/xerces-1.2.3.jar:$LIBDIR/xalan-2.0.0.jar:$LIBDIR/xalanj1compat.jar:$LIBDIR/bsf.jar
  
-LOCALCLASSPATH=$LOCALCLASSPATH:$LIBDIR/jimi-1.0.jar:$LIBDIR/logkit-1.0.jar:$LIBDIR/avalon-framework-4.0.jar
  
+LOCALCLASSPATH=$LOCALCLASSPATH:$LIBDIR/jimi-1.0.jar:$LIBDIR/avalon-framework-cvs-20020315.jar
   
   ANT_HOME=$LIBDIR
   
  
  
  
  1.44.2.9  +3 -5  xml-fop/build.xml
  
  Index: build.xml
  

cvs commit: xml-fop/src/org/apache/fop/tools/anttasks Fop.java

2001-09-24 Thread keiron

keiron  01/09/24 01:51:17

  Modified:docs/design build.xml
   docs/examples build.xml
   docs/xml-docs build.xml
   lib  buildtools.jar
   src/org/apache/fop/pdf PDFDocument.java
   src/org/apache/fop/tools/anttasks Fop.java
  Log:
  this patch alters the fop ant task so that other render output
  formats are supported
  output type can be specified by mime type and also handles
  file sets
  Submitted by: Jeremias Maerki [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.3   +42 -57xml-fop/docs/design/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/xml-fop/docs/design/build.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build.xml 2001/09/10 11:32:13 1.2
  +++ build.xml 2001/09/24 08:51:17 1.3
  @@ -1,73 +1,58 @@
   ?xml version=1.0?
  -
   !-- === --
   !-- JBoss documentation build file  --
   !-- === --
  -
   project name=FOPDocs default=docs basedir=./
  - target name=init
  + target name=init
property name=Name value=FOPDocs/
property name=name value=fopdocs/
property name=version value=0.1/
  - 
property name=lib.dir value=${basedir}/lib/
  -
  -  taskdef name=xslt classname=org.apache.fop.tools.anttasks.Xslt/
  -  taskdef name=fop classname=org.apache.fop.tools.anttasks.Fop/
  -/target
  -  
  -  !-- === --
  -  !-- Generate a help screen  --
  -  !-- === --
  -  target name=help depends=init
  - 
  -echo message=${name}-${version} build file, available targets: /
  -echo message= /
  -echo message=main: Compile and prepare deployment directory.  /
  -echo message=pdf : Compile and prepare pdf user docs. /
  -echo message=clean   : Clean deployment and distribution.  /
  -echo message= /
  -echo message=   USAGE: build lt;targetgt;  /
  -
  -  /target
  -  
  -  !-- === --
  -  !-- Prepares the build directory--
  -  !-- === --
  -  target name=prepare depends=init
  -  /target
  -  
  -  !-- === --
  -  !-- Generates the pdf documentation --
  -  !-- === --
  -  target name=pdf depends=prepare
  -echo message=Building pdf documentation. Please wait .../
  -delete file=fop.fo/
  -xslt infile=fop.xml xsltfile=docbook/fo/docbook.xsl
  -dependent=fop.xml
  -outfile=fop.fo smart=yes/
  -!--
  + taskdef name=xslt classname=org.apache.fop.tools.anttasks.Xslt/
  + taskdef name=fop classname=org.apache.fop.tools.anttasks.Fop/
  + /target
  + !-- === --
  + !-- Generate a help screen  --
  + !-- === --
  + target name=help depends=init
  + echo message=${name}-${version} build file, available targets:/
  + echo 
message=/
  + echo message=main: Compile and prepare deployment 
directory. /
  + echo message=pdf : Compile and prepare pdf user docs. /
  + echo message=clean   : Clean deployment and distribution. /
  + echo 
message=/
  + echo message=  USAGE: build lt;targetgt; /
  + /target
  + !-- === --
  + !-- Prepares the build directory--
  + !-- === --
  + target name=prepare depends=init/
  + !-- === --
  + !-- Generates the pdf documentation --
  + !-- === --
  + target name=pdf depends=prepare
  + echo 

cvs commit: xml-fop/src/org/apache/fop/tools/anttasks Fop.java

2001-08-20 Thread keiron

keiron  01/08/20 23:18:56

  Modified:src/org/apache/fop/apps CommandLineOptions.java
CommandLineStarter.java Driver.java
FOInputHandler.java Starter.java
TraxInputHandler.java XSLTInputHandler.java
   src/org/apache/fop/render PrintRenderer.java Renderer.java
   src/org/apache/fop/render/awt AWTRenderer.java
   src/org/apache/fop/render/mif MIFRenderer.java
   src/org/apache/fop/render/pcl PCLRenderer.java
   src/org/apache/fop/render/pdf PDFRenderer.java
   src/org/apache/fop/render/ps PSRenderer.java
   src/org/apache/fop/render/txt TXTRenderer.java
   src/org/apache/fop/render/xml XMLRenderer.java
   src/org/apache/fop/tools TestConverter.java
   src/org/apache/fop/tools/anttasks Fop.java
  Added:   src/org/apache/fop/render AbstractRenderer.java
  Log:
  changed to new logging for renderers
  
  Revision  ChangesPath
  1.12  +1 -2  xml-fop/src/org/apache/fop/apps/CommandLineOptions.java
  
  Index: CommandLineOptions.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/CommandLineOptions.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- CommandLineOptions.java   2001/08/20 11:19:22 1.11
  +++ CommandLineOptions.java   2001/08/21 06:18:54 1.12
  @@ -1,5 +1,5 @@
   /*
  - * $Id: CommandLineOptions.java,v 1.11 2001/08/20 11:19:22 keiron Exp $
  + * $Id: CommandLineOptions.java,v 1.12 2001/08/21 06:18:54 keiron 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.
  @@ -13,7 +13,6 @@
   import java.io.FileNotFoundException;
   
   // FOP
  -import org.apache.fop.messaging.MessageHandler;
   import org.apache.fop.configuration.Configuration;
   import org.apache.fop.apps.FOPException;
   
  
  
  
  1.11  +1 -2  xml-fop/src/org/apache/fop/apps/CommandLineStarter.java
  
  Index: CommandLineStarter.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/CommandLineStarter.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- CommandLineStarter.java   2001/08/20 11:19:22 1.10
  +++ CommandLineStarter.java   2001/08/21 06:18:54 1.11
  @@ -1,5 +1,5 @@
   /*
  - * $Id: CommandLineStarter.java,v 1.10 2001/08/20 11:19:22 keiron Exp $
  + * $Id: CommandLineStarter.java,v 1.11 2001/08/21 06:18:54 keiron 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.
  @@ -21,7 +21,6 @@
   
   
   // FOP
  -import org.apache.fop.messaging.MessageHandler;
   import org.apache.fop.configuration.Configuration;
   
   /**
  
  
  
  1.33  +21 -16xml-fop/src/org/apache/fop/apps/Driver.java
  
  Index: Driver.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/Driver.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- Driver.java   2001/08/20 11:19:22 1.32
  +++ Driver.java   2001/08/21 06:18:54 1.33
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Driver.java,v 1.32 2001/08/20 11:19:22 keiron Exp $
  + * $Id: Driver.java,v 1.33 2001/08/21 06:18:54 keiron 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.
  @@ -207,6 +207,23 @@
   _treeBuilder.setLogger(log);
   }
   
  +private Logger getLogger() {
  +if(log == null) {
  +Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
  +PatternFormatter formatter = new PatternFormatter(
  +   [%{priority}]: %{message}\n%{throwable} );
  +
  +LogTarget target = null;
  +target = new StreamTarget(System.out, formatter);
  +
  +hierarchy.setDefaultLogTarget(target);
  +log = hierarchy.getLoggerFor(fop);
  +log.setPriority(Priority.INFO);
  +log.error(Logger not set);
  +}
  +return log;
  +}
  +
   /**
* Resets the Driver so it can be reused. Property and element
* mappings are reset to defaults.
  @@ -327,6 +344,7 @@
* @param renderer the renderer instance to use
*/
   public void setRenderer(Renderer renderer) {
  +renderer.setLogger(getLogger());
   _renderer = renderer;
   }
   
  @@ -420,22 +438,8 @@
* events but isn't a SAX Parser itself.
*/
   public 

cvs commit: xml-fop/src/org/apache/fop/tools/anttasks Fop.java

2001-06-21 Thread keiron

keiron  01/06/21 07:27:44

  Modified:src/org/apache/fop/tools/anttasks Fop.java
  Log:
  sets baseDir according to file being converted
  
  Revision  ChangesPath
  1.8   +3 -2  xml-fop/src/org/apache/fop/tools/anttasks/Fop.java
  
  Index: Fop.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/tools/anttasks/Fop.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Fop.java  2001/06/21 13:35:10 1.7
  +++ Fop.java  2001/06/21 14:27:40 1.8
  @@ -1,4 +1,4 @@
  -/* $Id: Fop.java,v 1.7 2001/06/21 13:35:10 keiron Exp $
  +/* $Id: Fop.java,v 1.8 2001/06/21 14:27:40 keiron 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.
  @@ -152,7 +152,8 @@
   
   public void run () throws FOPException {
   try {
  -Configuration.put(baseDir, 
task.getBasedir().toURL().toExternalForm());
  +//Configuration.put(baseDir, 
task.getBasedir().toURL().toExternalForm());
  +Configuration.put(baseDir, 
task.getFofile().getParentFile().toURL().toExternalForm());
   } catch (Exception e) {
   task.log(Error setting base directory, Project.MSG_DEBUG);
   }
  
  
  

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