nicolaken    02/04/03 09:51:49

  Added:       tools/antipede/bin ant ant.bat antRun antRun.bat antRun.pl
                        complete-ant-cmd.pl lcp.bat runant.pl runant.py
               tools/antipede build.xtarget tasks.properties
               tools/antipede/resources/stylesheets layout.xsl log.xsl
                        module.css module.xsl properties.xsl status.xsl
                        xml.xsl
  Log:
  Update of Krysalis Centipede build system to version 1.0-dev
  
  Revision  Changes    Path
  1.1                  jakarta-poi/tools/antipede/bin/ant
  
  Index: ant
  ===================================================================
  #! /bin/sh
  
  #   Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
  #   reserved.
  
  if [ -f "$HOME/.antrc" ] ; then 
    . $HOME/.antrc
  fi
  
  # OS specific support.  $var _must_ be set to either true or false.
  cygwin=false;
  darwin=false;
  case "`uname`" in
    CYGWIN*) cygwin=true ;;
    Darwin*) darwin=true ;;
  esac
  
  if [ -z "$ANT_HOME" ] ; then
    # try to find ANT
    if [ -d /opt/ant ] ; then 
      ANT_HOME=/opt/ant
    fi
  
    if [ -d ${HOME}/opt/ant ] ; then 
      ANT_HOME=${HOME}/opt/ant
    fi
  
    ## resolve links - $0 may be a link to ant's home
    PRG=$0
    progname=`basename $0`
    saveddir=`pwd`
  
    # need this for relative symlinks
    cd `dirname $PRG`
    
    while [ -h "$PRG" ] ; do
      ls=`ls -ld "$PRG"`
      link=`expr "$ls" : '.*-> \(.*\)$'`
      if expr "$link" : '.*/.*' > /dev/null; then
        PRG="$link"
      else
        PRG="`dirname $PRG`/$link"
      fi
    done
    
    ANT_HOME=`dirname "$PRG"`/..
  
    # make it fully qualified
    ANT_HOME=`cd "$ANT_HOME" && pwd`
  
    cd $saveddir
  fi
  
  # For Cygwin, ensure paths are in UNIX format before anything is touched
  if $cygwin ; then
    [ -n "$ANT_HOME" ] &&
      ANT_HOME=`cygpath --unix "$ANT_HOME"`
    [ -n "$JAVA_HOME" ] &&
      JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
    [ -n "$CLASSPATH" ] &&
      CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
  fi
  
  if [ -z "$JAVACMD" ] ; then 
    if [ -n "$JAVA_HOME"  ] ; then
      if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 
        # IBM's JDK on AIX uses strange locations for the executables
        JAVACMD="$JAVA_HOME/jre/sh/java"
      else
        JAVACMD="$JAVA_HOME/bin/java"
      fi
    else
      JAVACMD=java
    fi
  fi
   
  if [ ! -x "$JAVACMD" ] ; then
    echo "Error: JAVA_HOME is not defined correctly."
    echo "  We cannot execute $JAVACMD"
    exit 1
  fi
  
  if [ -n "$CLASSPATH" ] ; then
    LOCALCLASSPATH="$CLASSPATH"
  fi
  
  # add in the dependency .jar files
  DIRLIBS=${ANT_HOME}/lib/*.jar
  for i in ${DIRLIBS}
  do
      # if the directory is empty, then it will return the input string
      # this is stupid, so case for it
      if [ "$i" != "${DIRLIBS}" ] ; then
        if [ -z "$LOCALCLASSPATH" ] ; then
          LOCALCLASSPATH=$i
        else
          LOCALCLASSPATH="$i":"$LOCALCLASSPATH"
        fi
      fi
  done
  
  if [ -n "$JAVA_HOME" ] ; then
    if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
      LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar"
    fi
  
    if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
      LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip"
    fi
  
    # OSX hack to make Ant work with jikes
    if $darwin ; then
      OSXHACK="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes"
      if [ -d ${OSXHACK} ] ; then
        for i in ${OSXHACK}/*.jar
        do
          JIKESPATH=$JIKESPATH:$i
        done
      fi
    fi
  
  else
    echo "Warning: JAVA_HOME environment variable is not set."
    echo "  If build fails because sun.* classes could not be found"
    echo "  you will need to set the JAVA_HOME environment variable"
    echo "  to the installation directory of java."
  fi
  
  # supply JIKESPATH to Ant as jikes.class.path
  if [ -n "$JIKESPATH" ] ; then
    if [ -n "$ANT_OPTS" ] ; then
      ANT_OPTS="$ANT_OPTS -Djikes.class.path=$JIKESPATH"
    else
      ANT_OPTS=-Djikes.class.path=$JIKESPATH
    fi
  fi
  
  # For Cygwin, switch paths to Windows format before running java
  if $cygwin; then
    ANT_HOME=`cygpath --path --windows "$ANT_HOME"`
    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
    LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"`
  fi
  
  "$JAVACMD" -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" $ANT_OPTS 
org.apache.tools.ant.Main $ANT_ARGS "$@"
  
  
  
  1.1                  jakarta-poi/tools/antipede/bin/ant.bat
  
  Index: ant.bat
  ===================================================================
  @echo off
  
  REM   Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
  REM   reserved.
  
  if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
  
  if not "%OS%"=="Windows_NT" goto win9xStart
  :winNTStart
  @setlocal
  
  rem %~dp0 is name of current script under NT
  set DEFAULT_ANT_HOME=%~dp0
  
  rem : operator works similar to make : operator
  set DEFAULT_ANT_HOME=%DEFAULT_ANT_HOME%\..
  
  if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
  set DEFAULT_ANT_HOME=
  
  rem Need to check if we are using the 4NT shell...
  if "%@eval[2+2]" == "4" goto setup4NT
  
  rem On NT/2K grab all arguments at once
  set ANT_CMD_LINE_ARGS=%*
  goto doneStart
  
  :setup4NT
  set ANT_CMD_LINE_ARGS=%$
  goto doneStart
  
  :win9xStart
  rem Slurp the command line arguments.  This loop allows for an unlimited number of 
  rem agruments (up to the command line limit, anyway).
  
  set ANT_CMD_LINE_ARGS=
  
  :setupArgs
  if %1a==a goto doneStart
  set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
  shift
  goto setupArgs
  
  :doneStart
  rem This label provides a place for the argument list loop to break out 
  rem and for NT handling to skip to.
  
  rem find ANT_HOME
  if not "%ANT_HOME%"=="" goto checkJava
  
  rem check for ant in Program Files on system drive
  if not exist "%SystemDrive%\Program Files\ant" goto checkSystemDrive
  set ANT_HOME=%SystemDrive%\Program Files\ant
  goto checkJava
  
  :checkSystemDrive
  rem check for ant in root directory of system drive
  if not exist %SystemDrive%\ant\nul goto checkCDrive
  set ANT_HOME=%SystemDrive%\ant
  goto checkJava
  
  :checkCDrive
  rem check for ant in C:\ant for Win9X users
  if not exist C:\ant\nul goto noAntHome
  set ANT_HOME=C:\ant
  goto checkJava
  
  :noAntHome
  echo ANT_HOME is not set and ant could not be located. Please set ANT_HOME.
  goto end
  
  :checkJava
  set _JAVACMD=%JAVACMD%
  set LOCALCLASSPATH=%CLASSPATH%
  for %%i in ("%ANT_HOME%\lib\*.jar") do call "%ANT_HOME%\bin\lcp.bat" %%i
  
  if "%JAVA_HOME%" == "" goto noJavaHome
  if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java
  if not exist "%_JAVACMD%.exe" echo Error: "%_JAVACMD%.exe" not found - check 
JAVA_HOME && goto end
  if exist "%JAVA_HOME%\lib\tools.jar" call "%ANT_HOME%\bin\lcp.bat" 
%JAVA_HOME%\lib\tools.jar
  if exist "%JAVA_HOME%\lib\classes.zip" call "%ANT_HOME%\bin\lcp.bat" 
%JAVA_HOME%\lib\classes.zip
  goto checkJikes
  
  :noJavaHome
  if "%_JAVACMD%" == "" set _JAVACMD=java
  echo.
  echo Warning: JAVA_HOME environment variable is not set.
  echo   If build fails because sun.* classes could not be found
  echo   you will need to set the JAVA_HOME environment variable
  echo   to the installation directory of java.
  echo.
  
  :checkJikes
  if not "%JIKESPATH%" == "" goto runAntWithJikes
  
  :runAnt
  "%_JAVACMD%" -classpath "%LOCALCLASSPATH%" -Dant.home="%ANT_HOME%" %ANT_OPTS% 
org.apache.tools.ant.Main %ANT_ARGS% %ANT_CMD_LINE_ARGS%
  goto end
  
  :runAntWithJikes
  "%_JAVACMD%" -classpath "%LOCALCLASSPATH%" -Dant.home="%ANT_HOME%" 
-Djikes.class.path="%JIKESPATH%" %ANT_OPTS% org.apache.tools.ant.Main %ANT_ARGS% 
%ANT_CMD_LINE_ARGS%
  
  :end
  set LOCALCLASSPATH=
  set _JAVACMD=
  set ANT_CMD_LINE_ARGS=
  
  if not "%OS%"=="Windows_NT" goto mainEnd
  :winNTend
  @endlocal
  
  :mainEnd
  if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"
  
  
  
  
  1.1                  jakarta-poi/tools/antipede/bin/antRun
  
  Index: antRun
  ===================================================================
  #! /bin/sh
  
  #   Copyright (c) 2001 The Apache Software Foundation.  All rights
  #   reserved.
  
  # Args: DIR command
  cd "$1"
  CMD="$2"
  shift
  shift
  
  exec $CMD "$@"
  
  
  
  1.1                  jakarta-poi/tools/antipede/bin/antRun.bat
  
  Index: antRun.bat
  ===================================================================
  @echo off
  
  REM   Copyright (c) 2001 The Apache Software Foundation.  All rights
  REM   reserved.
  
  rem Change drive and directory to %1 (Win9X only for NT/2K use "cd /d")
  cd %1
  %1\
  set ANT_RUN_CMD=%2
  shift
  shift
  
  set PARAMS=
  :loop
  if ""%1 == "" goto runCommand
  set PARAMS=%PARAMS% %1
  shift
  goto loop
  
  :runCommand
  rem echo %ANT_RUN_CMD% %PARAMS%
  %ANT_RUN_CMD% %PARAMS%
  
  
  
  
  1.1                  jakarta-poi/tools/antipede/bin/antRun.pl
  
  Index: antRun.pl
  ===================================================================
  #!/usr/bin/perl
  #######################################################################
  #
  # antRun.pl
  #
  # wrapper script for invoking commands on a platform with Perl installed
  # this is akin to antRun.bat, and antRun the SH script 
  #
  # created:         2001-10-18
  # last modified:   2001-11-13
  # author:          Jeff Tulley [EMAIL PROTECTED] 
  #######################################################################
  #be fussy about variables
  use strict;
  
  #turn warnings on during dev; generates a few spurious uninitialised var access 
warnings
  #use warnings;
  
  #and set $debug to 1 to turn on trace info (currently unused)
  my $debug=1;
  
  #######################################################################
  # change drive and directory to "%1"
  my $ANT_RUN_CMD = @ARGV[0];
  
  # assign current run command to "%2"
  chdir (@ARGV[0]) || die "Can't cd to $ARGV[0]: $!\n";
  if ($^O eq "NetWare") {
      # There is a bug in Perl 5 on NetWare, where chdir does not
      # do anything.  On NetWare, the following path-prefixed form should 
      # always work. (afaict)
      $ANT_RUN_CMD .= "/".@ARGV[1];
  }
  else {
      $ANT_RUN_CMD = @ARGV[1];
  }
  
  # dispose of the first two arguments, leaving only the command's args.
  shift;
  shift;
  
  # run the command
  my $returnValue = system $ANT_RUN_CMD, @ARGV;
  if ($returnValue eq 0) {
      exit 0;
  }
  else {
      # only 0 and 1 are widely recognized as exit values
      # so change the exit value to 1
      exit 1;
  }
  
  
  
  1.1                  jakarta-poi/tools/antipede/bin/complete-ant-cmd.pl
  
  Index: complete-ant-cmd.pl
  ===================================================================
  #!/usr/bin/perl
  #
  #   Copyright (c) 2001 The Apache Software Foundation.  All rights
  #   reserved.
  #
  # A script to allow Bash or Z-Shell to complete an Ant command-line.  
  #
  # To install for Bash 2.0 or better, add the following to ~/.bashrc:
  # 
  #     $ complete -C complete-ant-cmd ant build.sh
  #
  # To install for Z-Shell 2.5 or better, add the following to ~/.zshrc:
  #
  #     function ant_complete () {
  #         local args_line args
  #         read -l args_line
  #         set -A args $args_line
  #         set -A reply $(COMP_LINE=$args_line complete-ant-cmd ${args[1]} $1)
  #     }
  #     compctl -K ant_complete ant build.sh
  #     
  # @author Mike Williams <[EMAIL PROTECTED]>
  
  my $cmdLine = $ENV{'COMP_LINE'};
  my $antCmd = $ARGV[0];
  my $word = $ARGV[1];
  
  my @completions;
  if ($word =~ /^-/) {
      list( restrict( $word, getArguments() ));
  } elsif ($cmdLine =~ /-(f|buildfile)\s+\S*$/) {
      list( getBuildFiles($word) );
  } else {
      list( restrict( $word, getTargets() ));
  }
  
  exit(0);
  
  sub list {
      for (@_) {
          print "$_\n";
      }
  }
  
  sub restrict {
      my ($word, @completions) = @_;
      grep( /^\Q$word\E/, @completions );
  }
  
  sub getArguments {
      qw(-buildfile -debug -emacs -f -find -help -listener -logfile 
         -logger -projecthelp -quiet -verbose -version); 
  }
  
  
  sub getBuildFiles {
      my ($word) = @_;
      grep( /\.xml$/, glob( "$word*" ));
  }
  
  sub getTargets {
  
      # Look for build-file
      my $buildFile = 'build.xml';
      if ($cmdLine =~ /-(f|buildfile)\s+(\S+)/) {
          $buildFile = $2;
      }
      return () unless (-f $buildFile);
  
      # Run "ant -projecthelp" to list targets.  Keep a cache of results in a
      # cache-file.
      my $cacheFile = $buildFile;
      $cacheFile =~ s|(.*/)?(.*)|${1}.ant-targets-${2}|;
      if ((!-e $cacheFile) || (-M $buildFile) < (-M $cacheFile)) {
          open( CACHE, '>'.$cacheFile ) || die "can\'t write $cacheFile: $!\n";
          open( HELP, "$antCmd -projecthelp -f '$buildFile'|" ) || return(); 
          my %targets;
          while( <HELP> ) {
              if (/^\s+(\S+)/) {
                  $targets{$1}++;
              }
          }
          my @targets = sort keys %targets;
          for (@targets) { print CACHE "$_\n"; }
          return @targets;
      }
      
      # Read the target-cache
      open( CACHE, $cacheFile ) || die "can\'t read $cacheFile: $!\n";
      my @targets;
      while (<CACHE>) {
          chop;
          s/\r$//;  # for Cygwin
          push( @targets, $_ );
      }
      close( CACHE );
      @targets;
  
  }
  
  
  
  
  
  
  1.1                  jakarta-poi/tools/antipede/bin/lcp.bat
  
  Index: lcp.bat
  ===================================================================
  REM   Copyright (c) 2001 The Apache Software Foundation.  All rights
  REM   reserved.
  
  set _CLASSPATHCOMPONENT=%1
  :argCheck
  if %2a==a goto gotAllArgs
  shift
  set _CLASSPATHCOMPONENT=%_CLASSPATHCOMPONENT% %1
  goto argCheck
  :gotAllArgs
  set LOCALCLASSPATH=%_CLASSPATHCOMPONENT%;%LOCALCLASSPATH%
  
  
  
  
  1.1                  jakarta-poi/tools/antipede/bin/runant.pl
  
  Index: runant.pl
  ===================================================================
  #!/usr/bin/perl
  #
  #   Copyright (c) 2001 The Apache Software Foundation.  All rights
  #   reserved.
  #
  #######################################################################
  #
  # runant.pl
  #
  # wrapper script for invoking ant in a platform with Perl installed
  # this may include cgi-bin invocation, which is considered somewhat daft.
  # (slo: that should be a separate file which can be derived from this
  # and returns the XML formatted output)
  #
  # the code is not totally portable due to classpath and directory splitting
  # issues. oops. (NB, use File::Spec::Functions  will help and the code is
  # structured for the catfile() call, but because of perl version funnies
  # the code is not included. 
  #
  # created:         2000-8-24
  # last modified:   2000-8-24
  # author:          Steve Loughran [EMAIL PROTECTED]
  #######################################################################
  #
  # Assumptions:
  #
  # - the "java" executable/script is on the command path
  # - ANT_HOME has been set
  # - target platform uses ":" as classpath separator or perl indicates it is dos/win32
  # - target platform uses "/" as directory separator.
  
  #be fussy about variables
  use strict;
  
  #platform specifics (disabled)
  #use File::Spec::Functions;
  
  #turn warnings on during dev; generates a few spurious uninitialised var access 
warnings
  #use warnings;
  
  #and set $debug to 1 to turn on trace info
  my $debug=0;
  
  #######################################################################
  #
  # check to make sure environment is setup
  #
  
  my $HOME = $ENV{ANT_HOME};
  if ($HOME eq "")
          {
      die "\n\nANT_HOME *MUST* be set!\n\n";
          }
  
  my $JAVACMD = $ENV{JAVACMD};
  $JAVACMD = "java" if $JAVACMD eq "";
  
  #ISSUE: what java wants to split up classpath varies from platform to platform 
  #and perl is not too hot at hinting which box it is on.
  #here I assume ":" 'cept on win32 and dos. Add extra tests here as needed.
  my $s=":";
  if(($^O eq "MSWin32") || ($^O eq "dos") || ($^O eq "cygwin"))
          {
          $s=";";
          }
  
  #build up standard classpath
  my $localpath=$ENV{CLASSPATH};
  if ($localpath eq "")
          {
          print "warning: no initial classpath\n" if ($debug);
          $localpath="";
          }
  
  #add jar files. I am sure there is a perl one liner to do this.
  my $jarpattern="$HOME/lib/*.jar";
  my @jarfiles =glob($jarpattern);
  print "jarfiles=@jarfiles\n" if ($debug);
  my $jar;
  foreach $jar (@jarfiles )
          {
          $localpath.="$s$jar";
          }
  
  #if Java home is defined, look for tools.jar & classes.zip and add to classpath
  my $JAVA_HOME = $ENV{JAVA_HOME};
  if ($JAVA_HOME ne "")
          {
          my $tools="$JAVA_HOME/lib/tools.jar";
          if (-e "$tools")
                  {
                  $localpath .= "$s$tools";
                  }
          my $classes="$JAVA_HOME/lib/classes.zip";
          if (-e $classes)
                  {
                  $localpath .= "$s$classes";
                  }
          }
  else
          {
      print "\n\nWarning: JAVA_HOME environment variable is not set.\n".
                  "If the build fails because sun.* classes could not be found\n".
                  "you will need to set the JAVA_HOME environment variable\n".
                  "to the installation directory of java\n";
          }
  
  #set JVM options and Ant arguments, if any
  my @ANT_OPTS=split(" ", $ENV{ANT_OPTS});
  my @ANT_ARGS=split(" ", $ENV{ANT_ARGS});
  
  #jikes
  if($ENV{JIKESPATH} ne "")
          {
          push @ANT_OPTS, "-Djikes.class.path=$ENV{JIKESPATH}";
          }
  
  #construct arguments to java
  my @ARGS;
  push @ARGS, "-classpath", "$localpath", "-Dant.home=$HOME";
  push @ARGS, @ANT_OPTS;
  push @ARGS, "org.apache.tools.ant.Main", @ANT_ARGS;
  push @ARGS, @ARGV;
  
  print "\n $JAVACMD @ARGS\n\n" if ($debug);
  
  my $returnValue = system $JAVACMD, @ARGS;
  if ($returnValue eq 0)
          {
          exit 0;
          }
  else
          {
          # only 0 and 1 are widely recognized as exit values
          # so change the exit value to 1
          exit 1;
          }
  
  
  
  1.1                  jakarta-poi/tools/antipede/bin/runant.py
  
  Index: runant.py
  ===================================================================
  #!/usr/bin/python
  """
  
   runant.py
  
        This script is a translation of the runant.pl written by Steve Loughran.
        It runs ant with/out arguments, it should be quite portable (thanks to
        the python os library)
        This script has been tested with Python2.0/Win2K
  
          Copyright (c) 2001 The Apache Software Foundation.  All rights
          reserved.
  
   created:         2001-04-11
   author:          Pierre Dittgen [EMAIL PROTECTED]
  
   Assumptions:
  
   - the "java" executable/script is on the command path
   - ANT_HOME has been set
  """
  import os, os.path, string, sys
  
  # Change it to 1 to get extra debug information
  debug = 0
  
  #######################################################################
  #
  # check to make sure environment is setup
  #
  if not os.environ.has_key('ANT_HOME'):
        print '\n\nANT_HOME *MUST* be set!\n\n'
        sys.exit(1)
  else:
        ANT_HOME = os.environ['ANT_HOME']
  
  if not os.environ.has_key('JAVACMD'):
        JAVACMD = 'java'
  else:
        JAVACMD = os.environ['JAVACMD']
  
  # Sets the separator char for CLASSPATH
  SEPARATOR = ':'
  if os.name == 'dos' or os.name == 'nt':
        SEPARATOR = ';'
  
  # Build up standard classpath
  localpath = ''
  if os.environ.has_key('CLASSPATH'):
        localpath = os.environ['CLASSPATH']
  else:
        if debug:
                print 'Warning: no initial classpath\n'
  
  # Add jar files
  LIBDIR = os.path.join(ANT_HOME, 'lib')
  jarfiles = []
  for file in os.listdir(LIBDIR):
        if file[-4:] == '.jar':
                jarfiles.append(os.path.join(LIBDIR,file))
  if debug:
        print 'Jar files:'
        for jar in jarfiles:
                print jar
  localpath = localpath + SEPARATOR + string.join(jarfiles, SEPARATOR)
  
  # If JAVA_HOME is defined, look for tools.jar & classes.zip
  # and add to classpath
  if os.environ.has_key('JAVA_HOME') and os.environ['JAVA_HOME'] != '':
        JAVA_HOME = os.environ['JAVA_HOME']
        TOOLS = os.path.join(JAVA_HOME, os.path.join('lib', 'tools.jar'))
        if os.path.exists(TOOLS):
                localpath = localpath + SEPARATOR + TOOLS
        CLASSES = os.path.join(JAVA_HOME, os.path.join('lib', 'classes.zip'))
        if os.path.exists(CLASSES):
                localpath = localpath + SEPARATOR + CLASSES
  else:
        print '\n\nWarning: JAVA_HOME environment variable is not set.\n', \
                'If the build fails because sun.* classes could not be found\n', \
                'you will need to set the JAVA_HOME environment variable\n', \
                'to the installation directory of java\n'
  
  # Jikes
  ANT_OPTS = []
  if os.environ.has_key('ANT_OPTS'):
        ANT_OPTS = string.split(os.environ['ANT_OPTS'])
  if os.environ.has_key('JIKESPATH'):
        ANT_OPTS.append('-Djikes.class.path=' + os.environ['JIKESPATH'])
  
  # Builds the commandline
  cmdline = '%s -classpath %s -Dant.home=%s %s org.apache.tools.ant.Main %s' \
         % (JAVACMD, localpath, ANT_HOME, string.join(ANT_OPTS,' '), \
                string.join(sys.argv[1:], ' '))
  
  if debug:
        print '\n%s\n\n' % (cmdline)
  
  # Run the biniou!
  os.system(cmdline)
  
  
  
  1.1                  jakarta-poi/tools/antipede/build.xtarget
  
  Index: build.xtarget
  ===================================================================
    <target name="-init">
     <tstamp>
       <format property="YEAR" pattern="yyyy" locale="en"/>
     </tstamp>
     
     <buildnumber/>
  
     <!--
      The location of tools.jar, relative to the JAVA_HOME home.
      If tools.jar is not present, exit with an error, since it
      means that a JDK is not installed.
      -->
      <property name="tools.jar" value="${java.home}/../lib/tools.jar"/>
      <available file="${tools.jar}" property="tools.jar.present"/>
      <fail unless="tools.jar.present" message="tools.jar not found. Probably JDK not 
installed."/>    
  
  
      <!-- create fixed centipede dirs -->
      <property name="tools.dir"                   value="tools"/>
      <property name="temp.dir"                    value="tools/tmp"/>
      <property name="cents.dir"                   value="tools/cents"/>
      <property name="installed.cents.dir"         value="tools/installed"/>
      <property name="antipede.dir"                value="tools/antipede"/>
      <property name="antipede.lib.dir"            value="tools/antipede/lib"/>
      <property name="cent.lib.dir.name"           value="lib"/>
      <property name="task.properties.name"        value="tasks.properties"/>
      <property name="cent.jar.suffix"             value="cent.jar"/>    
      <property name="cent.dir.suffix"             value="cent"/>    
      <property name="cent.installed.suffix"       value="installed"/>      
      
                  
      <!-- define all ant tasks in antipede -->
      <taskdef file="${antipede.dir}/${task.properties.name}">
       <classpath>
        <path>
         <fileset dir="${antipede.lib.dir}" casesensitive="yes"> 
           <include name="*.jar"/>
           <include name="*.zip"/>
         </fileset>  
        </path>
       </classpath>
      </taskdef>
   
      <!-- Unpack jarred cents -->
      <antipede-foreach target="-cent-unjar" param="current.cent.jar">
       <fileset dir="." casesensitive="yes"> 
        <patternset>
         <include name="${cents.dir}/*.${cent.jar.suffix}"/>
        </patternset>
       </fileset>  
      </antipede-foreach>
   
      <mkdir dir="${temp.dir}"/>
      <delete file="${temp.dir}/${task.properties.name}"/>
                
      <!-- put all ant task definitions in cents in a single file -->
      <concat destfile="${temp.dir}/${task.properties.name}" append="no">
        <fileset dir=".">
         <patternset>
           <include name="${cents.dir}/*.${cent.dir.suffix}/${task.properties.name}"/>
         </patternset>
       </fileset>          
      </concat>
      
      <!-- define the tasks found in cents -->
      <taskdef file="${temp.dir}/${task.properties.name}">
       <classpath>
         <fileset dir="${tools.dir}" casesensitive="yes"> 
           <include name="**/*.jar"/>
         </fileset> 
       </classpath>
      </taskdef>
      
     <!--
      Load project information
      -->
      <centipede-xml-property file="module.xml"     prefix="xgump"    keeproot="true" 
/>
      <centipede-xml-property file="status.xml"     prefix="xstatus"  keeproot="false" 
 />   
      <centipede-xml-property file="layout.xml"     prefix="xlayout"  keeproot="false" 
 />
      <centipede-xml-property file="properties.xml"                   keeproot="false" 
 /> 
      
    </target>
  
    <!-- ================================ -->
    <!--  Used only by the -init target   -->
    <!-- =================================--> 
    <target  name="-cent-unjar">
      <unjar src="${current.cent.jar}" dest="${cents.dir}"/> 
      <move file="${current.cent.jar}" 
toFile="${current.cent.jar}.${cent.installed.suffix}"/> 
    </target>       
             
    <!-- ============================================= -->
    <!-- Simple utility target to call a cent target   -->
    <!-- ==============================================-->
    <target name="call-cent">
       <ant antfile="tools/cents/${cent-name}.cent/xbuild.xml"
           inheritAll="true" 
           dir="."
           target="${cent-target}" />       
    </target>           
  
  
  1.1                  jakarta-poi/tools/antipede/tasks.properties
  
  Index: tasks.properties
  ===================================================================
  antipede-foreach=net.sf.antcontrib.logic.ForEach
  antipede-if=net.sf.antcontrib.logic.IfTask
  antipede-propertycopy=net.sf.antcontrib.property.PropertyCopy
  antipede-switch=net.sf.antcontrib.logic.Switch
  antipede-trycatch=net.sf.antcontrib.logic.TryCatchTask
  
  
  1.1                  jakarta-poi/tools/antipede/resources/stylesheets/layout.xsl
  
  Index: layout.xsl
  ===================================================================
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
     
     <xsl:output indent="yes" method="html"/>
  
     <xsl:template match="/">
        <html>
           <head>
             <title>Project properties</title>
             <style><![CDATA[
     <!--
  
  td.block
  {   display:block; 
      text-align: justify; 
      font-weight:plain;
      padding: 0px;
      background-color: #414681; 
      color: #ffffff; 
      margin: 5px 0px 5px 0px; 
      font-size: 12px; 
      font-family: Verdana, Arial, Helvetica, sans-serif
  }
  
  td.comment
  {   display:block; 
      text-align: justify; 
      font-weight:plain;
      font-style:italic;   
      padding: 0px;
      background-color: #cfcdc6; 
      color: #000000; 
      margin: 5px 0px 5px 0px; 
      font-size: 12px; 
      font-family: Verdana, Arial, Helvetica, sans-serif
  }
  
  td.name {display:block; 
        list-style-type:disc;
        text-align: left; 
        font-weight:plain;
        padding: 0px;
        background-color: #FFFFFF; 
        color: #000000; 
        margin: 0px 0px 0px 40px; 
        font-size: 12px; 
        font-family: Verdana, Arial, Helvetica, sans-serif
      }
      
  
  td.value {
      display:block; 
      text-align: left; 
      font-weight:plain;
      padding: 0px;
      background-color: #ffe3a6; 
      color: #000000; 
      margin: 0px 0px 0px 40px; 
      font-size: 12px; 
      font-family: Verdana, Arial, Helvetica, sans-serif
    }
  
  
       //-->]]>
  
             </style>
           </head>
           <body>
             <table><tr><td>
              <xsl:apply-templates/>
             </td></tr></table> 
           </body>
        </html>
     </xsl:template>
  
     <xsl:template match="@*">
     </xsl:template>
  
     <xsl:template match="text()">
        <xsl:value-of select="."/>
     </xsl:template>
  
     <xsl:template match="comment()">
       <table><tr><td class="comment"><pre>
        <xsl:value-of select="."/>
       </pre></td></tr></table>
     </xsl:template>
  
     <xsl:template match="*">
       <table><tr><td class="block">
       <xsl:value-of select="name(.)"/>
       <table>
       <xsl:for-each select="@*">
        <tr>
          <td class="name"><xsl:value-of select="name(.)"/></td>
          <td class="value">=<xsl:value-of select="."/></td>
        </tr>      
       </xsl:for-each>
       </table> 
       </td></tr></table>        
     </xsl:template>
  
     <xsl:template match="*[node()]">
       <table><tr><td class="block">
       <xsl:value-of select="name(.)"/>
       </td></tr></table> 
      
       <table><tr>
       <td width="20px"></td>
       <td class="name">     
       <xsl:apply-templates/>
       </td></tr></table> 
       
     </xsl:template>
  
     <xsl:template match="*[text() and not (comment() or processing-instruction())]">
        <br/><xsl:value-of select="name(.)"/>
        <xsl:apply-templates select="@*"/>
        <xsl:value-of select="."/>
     </xsl:template>
  
     <xsl:template name="nbsp-ref">
        <xsl:text>&#160;</xsl:text>
     </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  jakarta-poi/tools/antipede/resources/stylesheets/log.xsl
  
  Index: log.xsl
  ===================================================================
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
  <xsl:output method="html" indent="yes" encoding="US-ASCII"/>
  <!--
   The Apache Software License, Version 1.1
  
   Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
   reserved.
  
   Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions
   are met:
  
   1. Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
  
   2. Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in
      the documentation and/or other materials provided with the
      distribution.
  
   3. The end-user documentation included with the redistribution, if
      any, must include the following acknowlegement:
         "This product includes software developed by the
      Apache Software Foundation (http://www.apache.org/)."
      Alternately, this acknowlegement may appear in the software itself,
      if and wherever such third-party acknowlegements normally appear.
  
   4. The names "The Jakarta Project", "Ant", and "Apache Software
      Foundation" must not be used to endorse or promote products derived
      from this software without prior written permission. For written
      permission, please contact [EMAIL PROTECTED]
  
   5. Products derived from this software may not be called "Apache"
      nor may "Apache" appear in their names without prior written
      permission of the Apache Group.
  
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   SUCH DAMAGE.
   ====================================================================
  
   This software consists of voluntary contributions made by many
   individuals on behalf of the Apache Software Foundation.  For more
   information on the Apache Software Foundation, please see
   <http://www.apache.org/>.
   -->
   
  <!--
  
    The purpose have this XSL is to provide a nice way to look at the output
    from the Ant XmlLogger (ie: ant -listener org.apache.tools.ant.XmlLogger )
    
    @author <a href="mailto:[EMAIL PROTECTED]";>Stephane Bailliez</a>
    
  -->
  <xsl:decimal-format decimal-separator="." grouping-separator="," />
  
  <xsl:template match="/">
  <html>
    <head>
      <style type="text/css">
      .bannercell {
        border: 0px;
        padding: 0px;
      }
      body {
        margin: 0;
        font:normal 100% arial,helvetica,sanserif;
        background-color:#FFFFFF;
        color:#000000;
      }
      table.status {
        font:bold 80% arial,helvetica,sanserif;
        background-color:#525D76;
        color:#ffffff;
      }
      table.log tr td, tr th {
        font-size: 80%;
      }
      .error {
        color:red;
      }
      .warn {
        color:brown;
      }
      .info {
        color:gray;
      }
      .debug{
        color:gray;
      }
      .failed {
        font-size:80%;
        background-color: red;
        color:#FFFFFF;
        font-weight: bold
      }
      .complete {
        font-size:80%;
        background-color: #525D76;
        color:#FFFFFF;
        font-weight: bold
      }
      .a td { 
        background: #efefef;
      }
      .b td { 
        background: #fff;
      }
      th, td {
        text-align: left;
        vertical-align: top;
      }
      th {
        background: #ccc;
        color: black;
      }
      table, th, td {
        border: none
      }
      h3 {
        font:bold 80% arial,helvetica,sanserif;
        background: #525D76;
        color: white;
        text-decoration: none;
        padding: 5px;
        margin-right: 2px;
        margin-left: 2px;
        margin-bottom: 0;
      }
      </style>
    </head>
    <body>
      <!-- jakarta logo -->
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr>
        <td valign="top" class="bannercell">
          <a href="http://jakarta.apache.org/";>
          <img src="http://jakarta.apache.org/images/jakarta-logo.gif"; 
alt="http://jakarta.apache.org"; align="left" border="0"/>
          </a>
        </td>
        <td style="text-align:right;vertical-align:bottom">
          <a href="htp://jakarta.apache.org/ant">Jakarta Ant</a>
        </td>
      </tr>
      </table>
        
      <table border="0" width="100%">
      <tr><td><hr noshade="yes" size="1"/></td></tr>
      </table>
  
      <xsl:apply-templates select="build"/>
  
      <!-- FOOTER -->
      <table width="100%">
        <tr><td><hr noshade="yes" size="1"/></td></tr>
        <tr><td>
        <div align="center"><font color="#525D76" size="-1"><em>
        Copyright &#169; 2000-2002, Apache Software Foundation
        </em></font></div>
        </td></tr>
      </table>
    </body>
  </html>
  </xsl:template>
  
  <xsl:template match="build">
    <!-- build status -->
    <table width="100%">
      <xsl:attribute name="class">
        <xsl:if test="@error">failed</xsl:if>
        <xsl:if test="not(@error)">complete</xsl:if>
      </xsl:attribute>
      <tr>
        <xsl:if test="@error">
          <td nowrap="yes">Build Failed</td> 
        </xsl:if>
        <xsl:if test="not(@error)">
          <td nowrap="yes">Build Complete</td>
        </xsl:if>
          <td style="text-align:right" nowrap="yes">Total Time: <xsl:value-of 
select="@time"/></td>
      </tr>
      <tr>
        <td colspan="2">
          <xsl:if test="@error">
            <tt><xsl:value-of select="@error"/></tt><br/>
            <i style="font-size:80%">See the <a href="#stacktrace" alt="Click for 
details">stacktrace</a>.</i>
          </xsl:if>
        </td>
      </tr>
    </table>
    <table border="1" cellspacing="2" cellpadding="3" width="100%" 
style="font-size:80%">
      <tr class="a"><td width="1">ant.file</td><td><xsl:value-of 
select="substring-after(message[contains(text(),'ant.file')], '->')"/></td></tr>
      <tr class="b"><td width="1">ant.version</td><td><xsl:value-of 
select="substring-after(message[contains(text(),'ant.version')], '->')"/></td></tr>
      <tr class="a"><td width="1">java.version</td><td><xsl:value-of 
select="substring-after(message[contains(text(),'java.vm.version')], '->')"/></td></tr>
      <tr class="b"><td width="1">os.name</td><td><xsl:value-of 
select="substring-after(message[contains(text(),'os.name')], '->')"/></td></tr>
    </table>
    <!-- build information -->
    <h3>Build events</h3>
    <table class="log" border="1" cellspacing="2" cellpadding="3" width="100%">
    <tr>
      <th nowrap="yes" align="left" width="1%">target</th>
      <th nowrap="yes" align="left" width="1%">task</th>
      <th nowrap="yes" align="left">message</th>
    </tr>
    <xsl:apply-templates select=".//message[@priority != 'debug']"/>
    </table>
    <p>
    <!-- stacktrace -->
    <xsl:if test="stacktrace">
    <a name="stacktrace"/>
    <h3>Error details</h3>
    <table width="100%">
      <tr><td>
        <pre><xsl:value-of select="stacktrace"/></pre>
      </td></tr>
    </table>
    </xsl:if>
    </p>
  </xsl:template>
  
  <!-- report every message but those with debug priority -->
  <xsl:template match="message[@priority!='debug']">
    <tr valign="top">
      <!-- alternated row style -->
      <xsl:attribute name="class">
        <xsl:if test="position() mod 2 = 1">a</xsl:if>
        <xsl:if test="position() mod 2 = 0">b</xsl:if>
      </xsl:attribute>
      <td nowrap="yes" width="1%"><xsl:value-of select="../../@name"/></td>
      <td nowrap="yes" style="text-align:right" width="1%">[ <xsl:value-of 
select="../@name"/> ]</td>
      <td class="{@priority}" nowrap="yes">
              <xsl:value-of select="text()"/>
      </td>
    </tr>
  </xsl:template>
  
  </xsl:stylesheet>
  
  
  
  1.1                  jakarta-poi/tools/antipede/resources/stylesheets/module.css
  
  Index: module.css
  ===================================================================
  module {
     display:block
     content: attr(name);
  }
  
  description
  {   display:block; 
      text-align: justify; 
      font-weight:plain;
      padding: 0px;
      background-color: #414681; 
      color: #ffffff; 
      margin: 5px 0px 5px 0px; 
      font-size: 12px; 
      font-family: Verdana, Arial, Helvetica, sans-serif
  }
  
  detailed, why, todo, changes, project, package
  {   display:block; 
      text-align: justify; 
      font-weight:plain;
      padding: 0px;
      background-color: #cfcdc6; 
      color: #000000; 
      margin: 5px 0px 5px 0px; 
      font-size: 12px; 
      font-family: Verdana, Arial, Helvetica, sans-serif
  }
  
  what {display:block; 
        list-style-type:disc;
        text-align: left; 
        font-weight:plain;
        padding: 0px;
        background-color: #FFFFFF; 
        color: #000000; 
        margin: 0px 0px 0px 40px; 
        font-size: 12px; 
        font-family: Verdana, Arial, Helvetica, sans-serif
      }
      
  goal {display:list-item;   font-weight:plain;}
  
  
  actions {
      display:block; 
      list-style-type:decimal; 
      counter-reset: item;
      text-align: left; 
      font-weight:plain;
      padding: 0px;
      background-color: #ffe3a6; 
      color: #000000; 
      margin: 0px 0px 0px 40px; 
      font-size: 12px; 
      font-family: Verdana, Arial, Helvetica, sans-serif
    }
  
  
  release {
      display:block; 
      list-style-type:decimal; 
      counter-reset: item;
      text-align: left; 
      font-weight:plain;
      padding: 0px;
      background-color: #b6aaff; 
      color: #000000; 
      margin: 0px 0px 0px 40px; 
      font-size: 12px; 
      font-family: Verdana, Arial, Helvetica, sans-serif
    }
    
  action {display:list-item; }
  
  release {display:block; margin-left:40px;
    list-style-type:decimal; counter-reset: item;}
  
  
  licence {  display:block; 
      text-align: left; 
      font-weight:bold;
      font-style:italic;
      padding: 0px;
      background-color: #ffffff; 
      color: #000000; 
      margin: 5px 0px 5px 0px; 
      font-size: 12px; 
      font-family: Verdana, Arial, Helvetica, sans-serif
      }
  credits {  display:block; 
      text-align: left; 
      font-weight:bold;
      padding: 0px;
      background-color: #FFFFFF; 
      color: #000000; 
      margin: 5px 0px 5px 0px; 
      font-size: 12px; 
      font-family: Verdana, Arial, Helvetica, sans-serif
      }
  
  
  
  1.1                  jakarta-poi/tools/antipede/resources/stylesheets/module.xsl
  
  Index: module.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
        <xsl:output method = "html" encoding="Windows-1252" />
        
        <xsl:template match="/">        
                <html>
                        <head>
                          <title>Gump descriptor of module <xsl:value-of 
select="module/@name" /></title>
                        </head>
                        <body>
                        
                         <h1><xsl:value-of select="module/@name" /></h1>
  
                         <p>website:<a><xsl:attribute  name = "href" >
                                <xsl:value-of select="module/url/@href" />
                               </xsl:attribute><xsl:value-of select="module/url/@href" 
/></a>  
                         <br/>cvs repository: <xsl:value-of 
select="module/cvs/@repository" />
                         <xsl:for-each select = "module/info/link">
                         <br/><xsl:value-of select="@id" />: <a><xsl:attribute  name = 
"href" ><xsl:value-of select="@href" /></xsl:attribute>
                            <xsl:value-of select="." /></a>     
                         </xsl:for-each>
                         <xsl:for-each select = "module/mailing-lists/mailing-list">
                         <br/><xsl:value-of select="@user" />&#160;mailing list:&#160; 
                              <a><xsl:attribute  name = "href" >mailto:<xsl:value-of 
select="@mail" /></xsl:attribute>
                                 <xsl:value-of select="@mail" /></a>
                              <a><xsl:attribute  name = "href" >mailto:<xsl:value-of 
select="@subscribe" /></xsl:attribute>
                                 Subscribe</a>  
                    <a><xsl:attribute  name = "href" >mailto:<xsl:value-of 
select="@unsubscribe" /></xsl:attribute>
                       Unsubscribe</a>                                   
                                                 
                         </xsl:for-each>
               </p>
                                                 
                         <h2>Description</h2>
                         <p><xsl:value-of select="module/description" /></p>
                         <p><xsl:value-of select="module/detailed" /></p>
  
                         <h2>Reasons</h2>
                         <p><xsl:value-of select="module/why" /></p>
                         
                         <h2>Goals</h2>                         
                         <ul>
                         <xsl:for-each select = "module/what/goal">
                         <li><xsl:value-of select="." /></li>                    
                         </xsl:for-each>
                         </ul>
  
                         <h2>License</h2>
                         <p><b><xsl:value-of select="module/licence" /></b></p>
                         
                         <h2>Credits</h2>                               
                         <ul>
                         <xsl:for-each select = "module/credits/credit">
                         <li><xsl:value-of select="." /></li>                    
                         </xsl:for-each>
                         </ul>                   
  
                         </body>
                </html>
        </xsl:template>
  </xsl:stylesheet>
  
  
  1.1                  jakarta-poi/tools/antipede/resources/stylesheets/properties.xsl
  
  Index: properties.xsl
  ===================================================================
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
     
     <xsl:output indent="yes" method="html"/>
  
     <xsl:template match="/">
        <html>
           <head>
             <title>Project properties</title>
             <style><![CDATA[
     <!--
  
  td.block
  {   display:block; 
      text-align: justify; 
      font-weight:plain;
      padding: 0px;
      background-color: #414681; 
      color: #ffffff; 
      margin: 5px 0px 5px 0px; 
      font-size: 12px; 
      font-family: Verdana, Arial, Helvetica, sans-serif
  }
  
  td.comment
  {   display:block; 
      text-align: justify; 
      font-weight:plain;
      font-style:italic;   
      padding: 0px;
      background-color: #cfcdc6; 
      color: #000000; 
      margin: 5px 0px 5px 0px; 
      font-size: 12px; 
      font-family: Verdana, Arial, Helvetica, sans-serif
  }
  
  td.name {display:block; 
        list-style-type:disc;
        text-align: left; 
        font-weight:plain;
        padding: 0px;
        background-color: #FFFFFF; 
        color: #000000; 
        margin: 0px 0px 0px 40px; 
        font-size: 12px; 
        font-family: Verdana, Arial, Helvetica, sans-serif
      }
      
  
  td.value {
      display:block; 
      text-align: left; 
      font-weight:plain;
      padding: 0px;
      background-color: #ffe3a6; 
      color: #000000; 
      margin: 0px 0px 0px 40px; 
      font-size: 12px; 
      font-family: Verdana, Arial, Helvetica, sans-serif
    }
  
  
       //-->]]>
  
             </style>
           </head>
           <body>
             <table><tr><td>
              <xsl:apply-templates/>
             </td></tr></table> 
           </body>
        </html>
     </xsl:template>
  
     <xsl:template match="@*">
     </xsl:template>
  
     <xsl:template match="text()">
        <xsl:value-of select="."/>
     </xsl:template>
  
     <xsl:template match="comment()">
       <table><tr><td class="comment"><pre>
        <xsl:value-of select="."/>
       </pre></td></tr></table>
     </xsl:template>
  
     <xsl:template match="*">
       <table><tr><td class="block">
       <xsl:value-of select="name(.)"/>
       <table>
       <xsl:for-each select="@*">
        <tr>
          <td class="name"><xsl:value-of select="name(.)"/></td>
          <td class="value">=<xsl:value-of select="."/></td>
        </tr>      
       </xsl:for-each>
       </table> 
       </td></tr></table>        
     </xsl:template>
  
     <xsl:template match="*[node()]">
       <table><tr><td class="block">
       <xsl:value-of select="name(.)"/>
       </td></tr></table> 
      
       <table><tr>
       <td width="20px"></td>
       <td class="name">     
       <xsl:apply-templates/>
       </td></tr></table> 
       
     </xsl:template>
  
     <xsl:template match="*[text() and not (comment() or processing-instruction())]">
        <br/><xsl:value-of select="name(.)"/>
        <xsl:apply-templates select="@*"/>
        <xsl:value-of select="."/>
     </xsl:template>
  
     <xsl:template name="nbsp-ref">
        <xsl:text>&#160;</xsl:text>
     </xsl:template>
  
  </xsl:stylesheet>
  
  
  1.1                  jakarta-poi/tools/antipede/resources/stylesheets/status.xsl
  
  Index: status.xsl
  ===================================================================
  <?xml version="1.0"?>
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
        <xsl:output method = "html" encoding="Windows-1252" />
        
        <xsl:template match="status">   
                         <h2>Developers</h2>                            
                         <table>
                         <xsl:for-each select = "developers/person">
                         <tr><td><xsl:value-of select="@name" /></td>
                             <td><xsl:value-of select="@email" /></td>
                             <td>[<xsl:value-of select="@id" />]</td></tr>             
          
                         </xsl:for-each>
                         </table>
  
  
                         <h2>To do</h2>                         
                         <xsl:for-each select = "todo/actions">
                         <h3><xsl:value-of select = "@priority"/>&#160;priority</h3>
                         <table>
                         <tr><th>context</th><th>what</th><th>assigned to</th></tr>
                         <xsl:for-each select = "action">
                         <tr><td><xsl:value-of select="@context" /></td>
                             <td><xsl:value-of select="." /></td>
                             <td>[<xsl:value-of select="@assigned-to" />]</td></tr>    
                  
                         </xsl:for-each>
                         </table>
                         </xsl:for-each>
  
                         <h2>Changes</h2>                               
                         <xsl:for-each select = "changes/release">
                         <h3>release&#160;<xsl:value-of select = "@version"/>&#160;
                             of date&#160;<xsl:value-of select = "@date"/></h3>
                         <table>
                         <tr><th>type</th><th>what</th><th>developer</th></tr>
                         <xsl:for-each select = "action">
                         <tr><td><xsl:value-of select="@type" /></td>
                             <td><xsl:value-of select="." /></td>
                             <td>[<xsl:value-of select="@dev" />]</td></tr>            
          
                         </xsl:for-each>
                         </table>
                         </xsl:for-each>        
        
                </xsl:template>
  </xsl:stylesheet>
  
  
  1.1                  jakarta-poi/tools/antipede/resources/stylesheets/xml.xsl
  
  Index: xml.xsl
  ===================================================================
  <!--
   |
   | XSLT REC Compliant Version of IE5 Default Stylesheet
   |
   | Original version by Jonathan Marsh ([EMAIL PROTECTED])
   | http://msdn.microsoft.com/xml/samples/defaultss/defaultss.xsl
   |
   | Conversion to XSLT 1.0 REC Syntax by Steve Muench ([EMAIL PROTECTED])
   |
   +-->
  <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
     <xsl:output indent="no" method="html"/>
  
     <xsl:template match="/">
        <HTML>
           <HEAD>
              <SCRIPT>
                 <xsl:comment><![CDATA[
                    function f(e){
                       if (e.className=="ci") {
                         if (e.children(0).innerText.indexOf("\n")>0) fix(e,"cb");
                       }
                       if (e.className=="di") {
                         if (e.children(0).innerText.indexOf("\n")>0) fix(e,"db");
                       } e.id="";
                    }
                    function fix(e,cl){
                      e.className=cl;
                      e.style.display="block";
                      j=e.parentElement.children(0);
                      j.className="c";
                      k=j.children(0);
                      k.style.visibility="visible";
                      k.href="#";
                    }
                    function ch(e) {
                      mark=e.children(0).children(0);
                      if (mark.innerText=="+") {
                        mark.innerText="-";
                        for (var i=1;i<e.children.length;i++) {
                          e.children(i).style.display="block";
                        }
                      }
                      else if (mark.innerText=="-") {
                        mark.innerText="+";
                        for (var i=1;i<e.children.length;i++) {
                          e.children(i).style.display="none";
                        }
                      }
                    }
                    function ch2(e) {
                      mark=e.children(0).children(0);
                      contents=e.children(1);
                      if (mark.innerText=="+") {
                        mark.innerText="-";
                        if (contents.className=="db"||contents.className=="cb") {
                          contents.style.display="block";
                        }
                        else {
                          contents.style.display="inline";
                        }
                      }
                      else if (mark.innerText=="-") {
                        mark.innerText="+";
                        contents.style.display="none";
                      }
                    }
                    function cl() {
                      e=window.event.srcElement;
                      if (e.className!="c") {
                        e=e.parentElement;
                        if (e.className!="c") {
                          return;
                        }
                      }
                      e=e.parentElement;
                      if (e.className=="e") {
                        ch(e);
                      }
                      if (e.className=="k") {
                        ch2(e);
                      }
                    }
                    function ex(){}
                    function h(){window.status=" ";}
                    document.onclick=cl;
                ]]>
                </xsl:comment>
              </SCRIPT>
              <STYLE>
                BODY {font:x-small 'Verdana'; margin-right:1.5em}
                  .c  {cursor:hand}
                  .b  {color:red; font-family:'Courier New'; font-weight:bold;
                       text-decoration:none}
                  .e  {margin-left:1em; text-indent:-1em; margin-right:1em}
                  .k  {margin-left:1em; text-indent:-1em; margin-right:1em}
                  .t  {color:#990000}
                  .xt {color:#990099}
                  .ns {color:red}
                  .dt {color:green}
                  .m  {color:blue}
                  .tx {font-weight:bold}
                  .db {text-indent:0px; margin-left:1em; margin-top:0px;
                       margin-bottom:0px;padding-left:.3em;
                       border-left:1px solid #CCCCCC; font:small Courier}
                  .di {font:small Courier}
                  .d  {color:blue}
                  .pi {color:blue}
                  .cb {text-indent:0px; margin-left:1em; margin-top:0px;
                       margin-bottom:0px;padding-left:.3em; font:small Courier;
                       color:#888888}
                  .ci {font:small Courier; color:#888888}
                  PRE {margin:0px; display:inline}
             </STYLE>
           </HEAD>
           <BODY class="st">
              <xsl:apply-templates/>
           </BODY>
        </HTML>
     </xsl:template>
  
     <xsl:template match="processing-instruction()">
        <DIV class="e">
           <SPAN class="b">
                        <xsl:call-template name="nbsp-ref"/>
           </SPAN>
           <SPAN class="m">
              <xsl:text>&lt;?</xsl:text>
           </SPAN>
           <SPAN class="pi">
              <xsl:value-of select="name(.)"/>
              <xsl:value-of select="."/>
           </SPAN>
           <SPAN class="m">
              <xsl:text>?></xsl:text>
           </SPAN>
        </DIV>
     </xsl:template>
  
     <xsl:template match="processing-instruction('xml')">
        <DIV class="e">
           <SPAN class="b">
              <xsl:call-template name="nbsp-ref"/>
           </SPAN>
           <SPAN class="m">
              <xsl:text>&lt;?</xsl:text>
           </SPAN>
           <SPAN class="pi">
              <xsl:text>xml </xsl:text>
              <xsl:for-each select="@*">
                 <xsl:value-of select="name(.)"/>
                 <xsl:text>="</xsl:text>
                 <xsl:value-of select="."/>
                 <xsl:text>" </xsl:text>
              </xsl:for-each>
           </SPAN>
           <SPAN class="m">
              <xsl:text>?></xsl:text>
           </SPAN>
        </DIV>
     </xsl:template>
  
     <xsl:template match="@*">
        <SPAN>
           <xsl:attribute name="class">
              <xsl:if test="xsl:*/@*">
                <xsl:text>x</xsl:text>
              </xsl:if>
              <xsl:text>t</xsl:text>
           </xsl:attribute>
           <xsl:value-of select="name(.)"/>
        </SPAN>
        <SPAN class="m">="</SPAN>
        <B>
           <xsl:value-of select="."/>
        </B>
        <SPAN class="m">"</SPAN>
     </xsl:template>
  
     <xsl:template match="text()">
        <DIV class="e">
           <SPAN class="b"> </SPAN>
           <SPAN class="tx">
              <xsl:value-of select="."/>
           </SPAN>
        </DIV>
     </xsl:template>
  
     <xsl:template match="comment()">
        <DIV class="k">
           <SPAN>
              <A STYLE="visibility:hidden" class="b" onclick="return false" 
onfocus="h()">-</A>
              <SPAN class="m">
                 <xsl:text>&lt;!--</xsl:text>
              </SPAN>
           </SPAN>
           <SPAN class="ci" id="clean">
              <PRE>
                 <xsl:value-of select="."/>
              </PRE>
           </SPAN>
           <SPAN class="b">
              <xsl:call-template name="nbsp-ref"/>
           </SPAN>
           <SPAN class="m">
              <xsl:text>--></xsl:text>
           </SPAN>
           <SCRIPT>f(clean);</SCRIPT>
        </DIV>
     </xsl:template>
  
     <xsl:template match="*">
        <DIV class="e">
           <DIV STYLE="margin-left:1em;text-indent:-2em">
              <SPAN class="b">
                        <xsl:call-template name="nbsp-ref"/>
              </SPAN>
              <SPAN class="m">&lt;</SPAN>
              <SPAN>
                 <xsl:attribute name="class">
                    <xsl:if test="xsl:*">
                       <xsl:text>x</xsl:text>
                    </xsl:if>
                    <xsl:text>t</xsl:text>
                 </xsl:attribute>
                 <xsl:value-of select="name(.)"/>
                 <xsl:if test="@*">
                    <xsl:text> </xsl:text>
                 </xsl:if>
              </SPAN>
              <xsl:apply-templates select="@*"/>
              <SPAN class="m">
                 <xsl:text>/></xsl:text>
              </SPAN>
           </DIV>
        </DIV>
     </xsl:template>
  
     <xsl:template match="*[node()]">
        <DIV class="e">
           <DIV class="c">
              <A class="b" href="#" onclick="return false" onfocus="h()">-</A>
              <SPAN class="m">&lt;</SPAN>
              <SPAN>
                 <xsl:attribute name="class">
                    <xsl:if test="xsl:*">
                       <xsl:text>x</xsl:text>
                    </xsl:if>
                    <xsl:text>t</xsl:text>
                 </xsl:attribute>
                 <xsl:value-of select="name(.)"/>
                 <xsl:if test="@*">
                    <xsl:text> </xsl:text>
                 </xsl:if>
              </SPAN>
              <xsl:apply-templates select="@*"/>
              <SPAN class="m">
                 <xsl:text>></xsl:text>
              </SPAN>
           </DIV>
           <DIV>
              <xsl:apply-templates/>
              <DIV>
                 <SPAN class="b">
                                <xsl:call-template name="nbsp-ref"/>
                 </SPAN>
                 <SPAN class="m">
                    <xsl:text>&lt;/</xsl:text>
                 </SPAN>
                 <SPAN>
                    <xsl:attribute name="class">
                       <xsl:if test="xsl:*">
                          <xsl:text>x</xsl:text>
                       </xsl:if>
                       <xsl:text>t</xsl:text>
                    </xsl:attribute>
                    <xsl:value-of select="name(.)"/>
                 </SPAN>
                 <SPAN class="m">
                    <xsl:text>></xsl:text>
                 </SPAN>
              </DIV>
           </DIV>
        </DIV>
     </xsl:template>
  
     <xsl:template match="*[text() and not (comment() or processing-instruction())]">
        <DIV class="e">
           <DIV STYLE="margin-left:1em;text-indent:-2em">
              <SPAN class="b">
                        <xsl:call-template name="nbsp-ref"/>
              </SPAN>
              <SPAN class="m">
                 <xsl:text>&lt;</xsl:text>
              </SPAN>
              <SPAN>
                 <xsl:attribute name="class">
                    <xsl:if test="xsl:*">
                       <xsl:text>x</xsl:text>
                    </xsl:if>
                    <xsl:text>t</xsl:text>
                 </xsl:attribute>
                 <xsl:value-of select="name(.)"/>
                 <xsl:if test="@*">
                    <xsl:text> </xsl:text>
                 </xsl:if>
              </SPAN>
              <xsl:apply-templates select="@*"/>
              <SPAN class="m">
                 <xsl:text>></xsl:text>
              </SPAN>
              <SPAN class="tx">
                 <xsl:value-of select="."/>
              </SPAN>
              <SPAN class="m">&lt;/</SPAN>
              <SPAN>
                 <xsl:attribute name="class">
                    <xsl:if test="xsl:*">
                       <xsl:text>x</xsl:text>
                    </xsl:if>
                    <xsl:text>t</xsl:text>
                 </xsl:attribute>
                 <xsl:value-of select="name(.)"/>
              </SPAN>
              <SPAN class="m">
                 <xsl:text>></xsl:text>
              </SPAN>
           </DIV>
        </DIV>
     </xsl:template>
  
     <xsl:template match="*[*]" priority="20">
        <DIV class="e">
           <DIV STYLE="margin-left:1em;text-indent:-2em" class="c">
              <A class="b" href="#" onclick="return false" onfocus="h()">-</A>
              <SPAN class="m">&lt;</SPAN>
              <SPAN>
                 <xsl:attribute name="class">
                    <xsl:if test="xsl:*">
                       <xsl:text>x</xsl:text>
                    </xsl:if>
                    <xsl:text>t</xsl:text>
                 </xsl:attribute>
                 <xsl:value-of select="name(.)"/>
                 <xsl:if test="@*">
                    <xsl:text> </xsl:text>
                 </xsl:if>
              </SPAN>
              <xsl:apply-templates select="@*"/>
              <SPAN class="m">
                 <xsl:text>></xsl:text>
              </SPAN>
           </DIV>
           <DIV>
              <xsl:apply-templates/>
              <DIV>
                 <SPAN class="b">
                                <xsl:call-template name="nbsp-ref"/>
                 </SPAN>
                 <SPAN class="m">
                    <xsl:text>&lt;/</xsl:text>
                 </SPAN>
                 <SPAN>
                    <xsl:attribute name="class">
                       <xsl:if test="xsl:*">
                          <xsl:text>x</xsl:text>
                       </xsl:if>
                       <xsl:text>t</xsl:text>
                    </xsl:attribute>
                    <xsl:value-of select="name(.)"/>
                 </SPAN>
                 <SPAN class="m">
                    <xsl:text>></xsl:text>
                 </SPAN>
              </DIV>
           </DIV>
        </DIV>
     </xsl:template>
  
     <xsl:template name="nbsp-ref">
        <xsl:text>&#160;</xsl:text>
     </xsl:template>
  
  </xsl:stylesheet>
  
  


Reply via email to