Make POI use commons.logging, make log4j optional and clean structure to comply with, and use, Krysalis Centipede 2.0.1.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352212 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fc4b082d09
commit
55f1c279c5
24
build.bat
24
build.bat
@ -1,23 +1,13 @@
|
|||||||
@echo off
|
@echo off
|
||||||
rem ----------------------------------------------------------------------------
|
|
||||||
rem build.bat - Win32 Build Script for Apache Cocoon
|
|
||||||
rem
|
|
||||||
rem $Id$
|
|
||||||
rem ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
rem ----- Copy Xalan and Xerces for the build system ------------------------
|
|
||||||
copy lib\optional\xerces*.jar tools\lib
|
|
||||||
copy lib\optional\xalan*.jar tools\lib
|
|
||||||
copy lib\optional\xml-api*.jar tools\lib
|
|
||||||
copy lib\optional\jtidy*.jar tools\lib
|
|
||||||
|
|
||||||
rem ----- Verify and Set Required Environment Variables ------------------------
|
|
||||||
|
|
||||||
REM Commented out so it always uses poi's ant -- gjs -- if not "%ANT_HOME%" == "" goto gotAntHome
|
|
||||||
set OLD_ANT_HOME=%ANT_HOME%
|
set OLD_ANT_HOME=%ANT_HOME%
|
||||||
set ANT_HOME=tools
|
set ANT_HOME=tools\ant
|
||||||
:gotAntHome
|
|
||||||
|
set OLD_CLASSPATH=%CLASSPATH%
|
||||||
|
set CLASSPATH=tools\centipede\lib\xml-apis.jar;tools\centipede\lib\xerces.jar;tools\centipede\lib\xalan.jar;tools\centipede\lib\junit.jar;tools\centipede\lib\jIzPress.jar;tools\centipede\lib\jtidy.jar
|
||||||
|
|
||||||
|
call %ANT_HOME%\bin\ant -listener org.apache.tools.ant.XmlLogger %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||||
|
|
||||||
call %ANT_HOME%\bin\ant %1 %2 %3 %4 %5 %6 %7 %8 %9
|
|
||||||
set ANT_HOME=%OLD_ANT_HOME%
|
set ANT_HOME=%OLD_ANT_HOME%
|
||||||
|
set CLASSPATH=%OLD_CLASSPATH%
|
||||||
|
|
||||||
|
22
build.sh
22
build.sh
@ -1,24 +1,24 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
echo
|
chmod u+x ./tools/ant/bin/antRun
|
||||||
echo "POI Build System "
|
chmod u+x ./tools/ant/bin/ant
|
||||||
echo "----------------------------"
|
|
||||||
|
|
||||||
cp -f ./lib/optional/xalan*.jar ./tools/lib
|
|
||||||
cp -f ./lib/optional/xerces*.jar ./tools/lib
|
|
||||||
cp -f ./lib/optional/xml-api*.jar ./tools/lib
|
|
||||||
cp -f ./lib/optional/jtidy*.jar ./tools/lib
|
|
||||||
|
|
||||||
chmod u+x ./tools/bin/antRun
|
|
||||||
chmod u+x ./tools/bin/ant
|
|
||||||
|
|
||||||
|
OLD_ANT_HOME=$ANT_HOME
|
||||||
unset ANT_HOME
|
unset ANT_HOME
|
||||||
|
|
||||||
CP=$CLASSPATH
|
CP=$CLASSPATH
|
||||||
export CP
|
export CP
|
||||||
unset CLASSPATH
|
unset CLASSPATH
|
||||||
|
|
||||||
$PWD/tools/bin/ant -logger org.apache.tools.ant.NoBannerLogger -emacs $@
|
CLASSPATH="./tools/centipede/lib/xml-apis.jar:./tools/centipede/lib/xerces.jar:./tools/centipede/lib/xalan.jar:./tools/centipede/lib/junit.jar:./tools/centipede/lib/jIzPress.jar:./tools/centipede/lib/jtidy.jar"
|
||||||
|
export CLASSPATH
|
||||||
|
|
||||||
|
$PWD/./tools/ant/bin/ant -listener org.apache.tools.ant.XmlLogger $@
|
||||||
|
|
||||||
|
unset CLASSPATH
|
||||||
|
|
||||||
CLASSPATH=$CP
|
CLASSPATH=$CP
|
||||||
export CLASSPATH
|
export CLASSPATH
|
||||||
|
ANT_HOME=OLD_ANT_HOME
|
||||||
|
export ANT_HOME
|
||||||
|
50
build.xml
50
build.xml
@ -1,20 +1,5 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!DOCTYPE project [
|
<!DOCTYPE project [
|
||||||
<!ENTITY preinit-target SYSTEM "./tools/targets/preinit.xtarget">
|
|
||||||
<!ENTITY init-target SYSTEM "./tools/targets/init.xtarget">
|
|
||||||
<!ENTITY compile-target SYSTEM "./tools/targets/compile.xtarget">
|
|
||||||
<!ENTITY interactive-target SYSTEM "./tools/targets/interactive.xtarget">
|
|
||||||
<!ENTITY scratchpad-target SYSTEM "./tools/targets/scratchpad.xtarget">
|
|
||||||
<!ENTITY contrib-target SYSTEM "./tools/targets/contrib.xtarget">
|
|
||||||
<!ENTITY util-target SYSTEM "./tools/targets/util.xtarget">
|
|
||||||
<!ENTITY dev-target SYSTEM "./tools/targets/dev.xtarget">
|
|
||||||
<!ENTITY test-target SYSTEM "./tools/targets/test.xtarget">
|
|
||||||
<!ENTITY robot-target SYSTEM "./tools/targets/robot.xtarget">
|
|
||||||
<!ENTITY docs-target SYSTEM "./tools/targets/docs.xtarget">
|
|
||||||
]>
|
|
||||||
|
|
||||||
<project default="interactive" basedir="." name="krysalis">
|
|
||||||
|
|
||||||
<!-- ===========================================================================
|
<!-- ===========================================================================
|
||||||
|
|
||||||
|
|
||||||
@ -24,7 +9,7 @@
|
|||||||
by
|
by
|
||||||
|
|
||||||
Nicola Ken Barozzi <barozzi@nicolaken.com>
|
Nicola Ken Barozzi <barozzi@nicolaken.com>
|
||||||
Marc Johnson <mjohnson at apache dot org>
|
Marc Johnson <mjohnson at apache dot org>
|
||||||
|
|
||||||
extends the Apache Cocoon Build System
|
extends the Apache Cocoon Build System
|
||||||
(http://xml.apache.org/cocoon/)
|
(http://xml.apache.org/cocoon/)
|
||||||
@ -32,6 +17,34 @@
|
|||||||
Stefano Mazzocchi <stefano@apache.org>
|
Stefano Mazzocchi <stefano@apache.org>
|
||||||
Carsten Ziegeler <cziegeler@apache.org>
|
Carsten Ziegeler <cziegeler@apache.org>
|
||||||
|
|
||||||
|
-->
|
||||||
|
<!-- ================= Main project targets and info ================= -->
|
||||||
|
<!ENTITY project-target SYSTEM "./src/targets/project.xtarget">
|
||||||
|
<!ENTITY interactive-target SYSTEM "./src/targets/interactive.xtarget">
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
|
||||||
|
<!-- ====================== Scratchpad targets ======================= -->
|
||||||
|
<!ENTITY scratchpad-target SYSTEM "./src/scratchpad/targets/scratchpad.xtarget">
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
|
||||||
|
<!-- ======================== Contrib targets ======================== -->
|
||||||
|
<!ENTITY contrib-target SYSTEM "./src/contrib/targets/contrib.xtarget">
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
|
||||||
|
<!-- ================== Krysalis Centipede targets =================== -->
|
||||||
|
<!ENTITY preinit-target SYSTEM "./tools/centipede/targets/preinit.xtarget">
|
||||||
|
<!ENTITY init-target SYSTEM "./tools/centipede/targets/init.xtarget">
|
||||||
|
<!ENTITY compile-target SYSTEM "./tools/centipede/targets/compile.xtarget">
|
||||||
|
<!ENTITY util-target SYSTEM "./tools/centipede/targets/util.xtarget">
|
||||||
|
<!ENTITY dev-target SYSTEM "./tools/centipede/targets/dev.xtarget">
|
||||||
|
<!ENTITY test-target SYSTEM "./tools/centipede/targets/test.xtarget">
|
||||||
|
<!ENTITY robot-target SYSTEM "./tools/centipede/targets/robot.xtarget">
|
||||||
|
<!ENTITY docs-target SYSTEM "./tools/centipede/targets/docs.xtarget">
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
]>
|
||||||
|
|
||||||
|
<project default="interactive" basedir="." name="krysalis">
|
||||||
|
<!--
|
||||||
|
|
||||||
Installing the build tools
|
Installing the build tools
|
||||||
==========================
|
==========================
|
||||||
@ -141,10 +154,13 @@ or
|
|||||||
|
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<!-- external reference are relative to to tools/targets/*.xtarget -->
|
<!-- external reference are relative to to **/*.xtarget; -->
|
||||||
|
<!-- see entity decalrations at the start of this file -->
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<!-- Pre Initialization --> &preinit-target;
|
<!-- Pre Initialization --> &preinit-target;
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
|
<!-- Project targets --> &project-target;
|
||||||
|
<!-- =================================================================== -->
|
||||||
<!-- Initialization targets --> &init-target;
|
<!-- Initialization targets --> &init-target;
|
||||||
<!-- =================================================================== -->
|
<!-- =================================================================== -->
|
||||||
<!-- Compile targets --> &compile-target;
|
<!-- Compile targets --> &compile-target;
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
|
/*
|
||||||
/* ====================================================================
|
* $Header$
|
||||||
|
* $Revision$
|
||||||
|
* $Date$
|
||||||
|
*
|
||||||
|
* ====================================================================
|
||||||
|
*
|
||||||
* The Apache Software License, Version 1.1
|
* The Apache Software License, Version 1.1
|
||||||
*
|
*
|
||||||
* Copyright (c) 2002 The Apache Software Foundation. All rights
|
* Copyright (c) 1999-2001 The Apache Software Foundation. All rights
|
||||||
* reserved.
|
* reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -17,21 +22,21 @@
|
|||||||
* the documentation and/or other materials provided with the
|
* the documentation and/or other materials provided with the
|
||||||
* distribution.
|
* distribution.
|
||||||
*
|
*
|
||||||
* 3. The end-user documentation included with the redistribution,
|
* 3. The end-user documentation included with the redistribution, if
|
||||||
* if any, must include the following acknowledgment:
|
* any, must include the following acknowlegement:
|
||||||
* "This product includes software developed by the
|
* "This product includes software developed by the
|
||||||
* Apache Software Foundation (http://www.apache.org/)."
|
* Apache Software Foundation (http://www.apache.org/)."
|
||||||
* Alternately, this acknowledgment may appear in the software itself,
|
* Alternately, this acknowlegement may appear in the software itself,
|
||||||
* if and wherever such third-party acknowledgments normally appear.
|
* if and wherever such third-party acknowlegements normally appear.
|
||||||
*
|
*
|
||||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
|
||||||
* "Apache POI" must not be used to endorse or promote products
|
* Foundation" must not be used to endorse or promote products derived
|
||||||
* derived from this software without prior written permission. For
|
* from this software without prior written permission. For written
|
||||||
* written permission, please contact apache@apache.org.
|
* permission, please contact apache@apache.org.
|
||||||
*
|
*
|
||||||
* 5. Products derived from this software may not be called "Apache",
|
* 5. Products derived from this software may not be called "Apache"
|
||||||
* "Apache POI", nor may "Apache" appear in their name, without
|
* nor may "Apache" appear in their names without prior written
|
||||||
* prior written permission of the Apache Software Foundation.
|
* permission of the Apache Group.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
@ -51,46 +56,10 @@
|
|||||||
* individuals on behalf of the Apache Software Foundation. For more
|
* individuals on behalf of the Apache Software Foundation. For more
|
||||||
* information on the Apache Software Foundation, please see
|
* information on the Apache Software Foundation, please see
|
||||||
* <http://www.apache.org/>.
|
* <http://www.apache.org/>.
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* HSSFLog.java
|
|
||||||
*
|
*
|
||||||
* Created on December 3, 2001, 2:30 PM
|
|
||||||
*/
|
|
||||||
package org.apache.poi.hssf;
|
|
||||||
|
|
||||||
import org.apache.poi.util.POILogFactory;
|
|
||||||
import org.apache.poi.util.POILogger;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides logging to HSSF without it having to mess with
|
|
||||||
* configuration/initialization.
|
|
||||||
*
|
|
||||||
* @author Andrew C. Oliver (acoliver at apache dot org)
|
|
||||||
* @author Marc Johnson (mjohnson at apache dot org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class HSSFLog
|
|
||||||
extends POILogFactory
|
|
||||||
{
|
|
||||||
private static HSSFLog _the_instance = null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new instance of HSSFLog
|
|
||||||
*/
|
|
||||||
|
|
||||||
private HSSFLog()
|
|
||||||
{
|
|
||||||
super("hssflog.properties", "HSSF.log");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static POILogger getPOILogger(final Class theclass)
|
|
||||||
{
|
|
||||||
if (_the_instance == null)
|
|
||||||
{
|
|
||||||
_the_instance = new HSSFLog();
|
|
||||||
}
|
|
||||||
return _the_instance.getLogger(theclass);
|
|
||||||
}
|
|
||||||
}
|
|
BIN
lib/core/commons-logging-1.0.jar
Normal file
BIN
lib/core/commons-logging-1.0.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/optional/log4j-core.jar
Normal file
BIN
lib/optional/log4j-core.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,28 +0,0 @@
|
|||||||
<!-- try.xml ... these are trial build targets which are currently
|
|
||||||
undergoing testing. When ready they can be moved into the main build.xml -->
|
|
||||||
|
|
||||||
<project default="poibrowser" basedir="../../" name="POIBrowser build">
|
|
||||||
|
|
||||||
<!-- =================================================================== -->
|
|
||||||
<!-- GUI Run Target -->
|
|
||||||
<!-- =================================================================== -->
|
|
||||||
<target name="poibrowser">
|
|
||||||
<taskdef name="user-input" classname="UserInput"
|
|
||||||
classpath="./tools/anttasks"/>
|
|
||||||
|
|
||||||
<property name="contrib.input.selection" value=""/>
|
|
||||||
<user-input name="contrib.input.selection">Please select a file to view </user-input>
|
|
||||||
|
|
||||||
<java classname="org.apache.poi.contrib.poibrowser.POIBrowser" fork="true">
|
|
||||||
<arg value="${contrib.input.selection}"/>
|
|
||||||
<classpath>
|
|
||||||
<pathelement location="build/jakarta-poi/classes"/>
|
|
||||||
<pathelement location="build/jakarta-poi/contrib/classes"/>
|
|
||||||
</classpath>
|
|
||||||
</java>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
|
|
||||||
</project>
|
|
||||||
|
|
||||||
<!-- End of file -->
|
|
0
tools/resources/Release-Checklist.txt → src/documentation/Release-Checklist.txt
Executable file → Normal file
0
tools/resources/Release-Checklist.txt → src/documentation/Release-Checklist.txt
Executable file → Normal file
@ -1,365 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<cocoon version="2.0">
|
|
||||||
|
|
||||||
<!-- ================ Apache Cocoon configuration file ================== -->
|
|
||||||
<!-- Please refer to the online documentation for full descriptions.
|
|
||||||
The notes that accompany the settings below are intended to be concise.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- ===================== General Components =========================== -->
|
|
||||||
|
|
||||||
<!-- Parser:
|
|
||||||
The default parser used in the Apache Cocoon 2 system is
|
|
||||||
org.apache.cocoon.components.parser.JaxpParser
|
|
||||||
Apache Cocoon 2 system requires a JAXP 1.1 parser.
|
|
||||||
If you have problems because your servlet environment uses its own
|
|
||||||
parser not conforming to JAXP 1.1 try using the alternative
|
|
||||||
XercesParser instead of the JaxpParser. To activate the XercesParser,
|
|
||||||
change the class attribute to
|
|
||||||
<parser class="org.apache.cocoon.components.parser.XercesParser"/>
|
|
||||||
You will also need to add a system property to your JVM
|
|
||||||
(probably on the startup of your servlet engine like this:
|
|
||||||
-Dorg.apache.cocoon.components.parser.Parser=org.apache.cocoon.components.parser.XercesParser
|
|
||||||
|
|
||||||
validate: This parameter causes the parser to be a validating parser.
|
|
||||||
XML validation is only being used for the documentation build.
|
|
||||||
(If you are going to use it elsewhere, then do so with caution.)
|
|
||||||
You really should have validated all of your XML documents already,
|
|
||||||
according to their proper DTD or schema. Do not expect Cocoon to do it.
|
|
||||||
-->
|
|
||||||
<parser class="org.apache.cocoon.components.parser.JaxpParser">
|
|
||||||
<parameter name="validate" value="false"/>
|
|
||||||
</parser>
|
|
||||||
|
|
||||||
<!-- Storing:
|
|
||||||
freememory: Indicates how much memory should be left free in the
|
|
||||||
JVM for normal operation.
|
|
||||||
heapsize: Indicates how big the heap size can grow to before the
|
|
||||||
cleanup thread kicks in.
|
|
||||||
objectlifetime: Indicates how long (seconds) a cache object will
|
|
||||||
be hold in memory. The object will be thrown out,
|
|
||||||
when the time is over.
|
|
||||||
interval: Indicates the interval of the cleanup thread in seconds.
|
|
||||||
maxobjects: Indicates how many objects will be hold in the cache.
|
|
||||||
When the number of maxobjects has been reached. The
|
|
||||||
last object in the cache will be thrown out.
|
|
||||||
usethread: Indicates whether we use a cleanup thread or not.
|
|
||||||
threadpriority: Indicates the priority of the cleanup thread.
|
|
||||||
(1 is the lowest priority and 10 is the highest).
|
|
||||||
filesystem: Turns the filesystem storage for objects on or off.
|
|
||||||
-->
|
|
||||||
<store class="org.apache.cocoon.components.store.MRUMemoryStore">
|
|
||||||
<parameter name="maxobjects" value="100"/>
|
|
||||||
<parameter name="threadpriority" value="5"/>
|
|
||||||
<parameter name="filesystem" value="true"/>
|
|
||||||
</store>
|
|
||||||
|
|
||||||
<!-- Store Janitor:
|
|
||||||
freememory = How much free memory shall be available in the jvm
|
|
||||||
heapsize = Indicates the limit of the jvm memory consumption
|
|
||||||
cleanupthreadinterval = How often shall the cleanup thread check memory
|
|
||||||
threadpriority = Indicates the thread priority of the cleanup thread
|
|
||||||
|
|
||||||
Be careful with the heapsize and freememory paramters. Wrong values can
|
|
||||||
cause high cpu usage.
|
|
||||||
Example configuration:
|
|
||||||
Jvm settings:
|
|
||||||
-Xms100000000 -Xmx200000000
|
|
||||||
store-janitor settings:
|
|
||||||
<parameter name="freememory" value="50000000"/>
|
|
||||||
<parameter name="heapsize" value="150000000"/>
|
|
||||||
|
|
||||||
Heapsize must be higher then the -Xms parameter and freememory
|
|
||||||
between those both.
|
|
||||||
-->
|
|
||||||
<store-janitor class="org.apache.cocoon.components.store.StoreJanitorImpl" logger="root.store">
|
|
||||||
<parameter name="freememory" value="1000000"/>
|
|
||||||
<parameter name="heapsize" value="60000000"/>
|
|
||||||
<parameter name="cleanupthreadinterval" value="10"/>
|
|
||||||
<parameter name="threadpriority" value="5"/>
|
|
||||||
</store-janitor>
|
|
||||||
|
|
||||||
<!-- Entity resolution catalogs:
|
|
||||||
catalog:
|
|
||||||
The default catalog is distributed at /resources/entities/catalog
|
|
||||||
This is the contextual pathname for Cocoon resources.
|
|
||||||
You can override this path, if necessary, using the "catalog" parameter.
|
|
||||||
<parameter name="catalog" value="/resources/entities/catalog"/>
|
|
||||||
However, it is probably desirable to leave this default catalog config
|
|
||||||
and declare your own local catalogs, which are loaded in addition to
|
|
||||||
the system catalog.
|
|
||||||
|
|
||||||
There are various ways to do local configuration (see "Entity Catalogs"
|
|
||||||
documentation). One way is via the CatalogManager.properties file.
|
|
||||||
As an additional method, you can specify the "local-catalog" parameter here.
|
|
||||||
|
|
||||||
local-catalog:
|
|
||||||
The full filesystem pathname to a single local catalog file.
|
|
||||||
<parameter name="local-catalog" value="/usr/local/sgml/mycatalog"/>
|
|
||||||
|
|
||||||
verbosity:
|
|
||||||
The level of messages for status/debug (messages go to standard output)
|
|
||||||
The following messages are provided ...
|
|
||||||
0 = none
|
|
||||||
1 = ? (... not sure yet)
|
|
||||||
2 = 1+, Loading catalog, Resolved public, Resolved system
|
|
||||||
3 = 2+, Catalog does not exist, resolvePublic, resolveSystem
|
|
||||||
10 = 3+, List all catalog entries when loading a catalog
|
|
||||||
(Cocoon also logs the "Resolved public" messages.)
|
|
||||||
TODO: determine all messages at each level
|
|
||||||
<parameter name="verbosity" value="2"/>
|
|
||||||
|
|
||||||
-->
|
|
||||||
<resolver class="org.apache.cocoon.components.resolver.ResolverImpl">
|
|
||||||
<parameter name="catalog" value="/resources/entities/catalog"/>
|
|
||||||
<parameter name="verbosity" value="0"/>
|
|
||||||
</resolver>
|
|
||||||
|
|
||||||
<!-- XSLT Processor:
|
|
||||||
-->
|
|
||||||
<xslt-processor class="org.apache.cocoon.components.xslt.XSLTProcessorImpl" logger="root.xslt">
|
|
||||||
<parameter name="use-store" value="true"/>
|
|
||||||
</xslt-processor>
|
|
||||||
|
|
||||||
<!-- URL Factory:
|
|
||||||
The url factory adds special url protocols to the system, they are then
|
|
||||||
available inside Cocoon, e.g. as a source argument for one of the sitemap
|
|
||||||
components.
|
|
||||||
-->
|
|
||||||
<url-factory>
|
|
||||||
<protocol name="resource" class="org.apache.cocoon.components.url.ResourceURLFactory"/>
|
|
||||||
<protocol name="context" class="org.apache.cocoon.components.url.ContextURLFactory"/>
|
|
||||||
</url-factory>
|
|
||||||
|
|
||||||
<!-- Source Handler:
|
|
||||||
The source handler adds special url protocols to the system, they are
|
|
||||||
then available inside Cocoon, e.g. as a source argument for one of the
|
|
||||||
sitemap components.
|
|
||||||
-->
|
|
||||||
<source-handler>
|
|
||||||
</source-handler>
|
|
||||||
|
|
||||||
<!-- Program Generator:
|
|
||||||
The ProgamGenerator builds programs from a XML document written in a
|
|
||||||
MarkupLanguage.
|
|
||||||
auto-reload:
|
|
||||||
root-package: persistent code repository.
|
|
||||||
preload:
|
|
||||||
-->
|
|
||||||
<program-generator>
|
|
||||||
<parameter name="auto-reload" value="false"/>
|
|
||||||
<parameter name="root-package" value="orgapachecocoonwww"/>
|
|
||||||
<parameter name="preload" value="true"/>
|
|
||||||
</program-generator>
|
|
||||||
|
|
||||||
<!-- Programming Languages:
|
|
||||||
-->
|
|
||||||
<programming-languages>
|
|
||||||
<java-language name="java">
|
|
||||||
<!-- compiler parameter specifies which class to use to compile Java.
|
|
||||||
Possible variants are Javac and Jikes compilers.
|
|
||||||
Javac requires javac.jar (included with Cocoon distribution).
|
|
||||||
Jikes requires IBM jikes compiler to be present in the PATH -->
|
|
||||||
<parameter name="compiler" value="org.apache.cocoon.components.language.programming.java.Javac"/>
|
|
||||||
<!-- A singleton-like implementation of a ClassLoader -->
|
|
||||||
<parameter name="class-loader" value="org.apache.cocoon.components.classloader.ClassLoaderManagerImpl"/>
|
|
||||||
</java-language>
|
|
||||||
</programming-languages>
|
|
||||||
|
|
||||||
<!-- Class loader:
|
|
||||||
A singleton-like implementation of a ClassLoader.
|
|
||||||
-->
|
|
||||||
<classloader class="org.apache.cocoon.components.classloader.ClassLoaderManagerImpl"/>
|
|
||||||
|
|
||||||
<!-- Markup Languages:
|
|
||||||
This section defines several builtin logicsheets. A logicsheet is an XML
|
|
||||||
filter used to translate user-defined, dynamic markup into equivalent
|
|
||||||
code embedding directives for a given markup language.
|
|
||||||
-->
|
|
||||||
<markup-languages>
|
|
||||||
<xsp-language name="xsp">
|
|
||||||
<parameter name="prefix" value="xsp"/>
|
|
||||||
<parameter name="uri" value="http://apache.org/xsp"/>
|
|
||||||
|
|
||||||
<!-- Defines the XSP Core logicsheet for the Java language -->
|
|
||||||
<target-language name="java">
|
|
||||||
<parameter name="core-logicsheet" value="resource://org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl"/>
|
|
||||||
|
|
||||||
<!-- The Request logicsheet (taglib) is an XSP logicsheet that wraps XML tags
|
|
||||||
around standard request operations -->
|
|
||||||
<builtin-logicsheet>
|
|
||||||
<parameter name="prefix" value="xsp-request"/>
|
|
||||||
<parameter name="uri" value="http://apache.org/xsp/request/2.0"/>
|
|
||||||
<parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/request.xsl"/>
|
|
||||||
</builtin-logicsheet>
|
|
||||||
|
|
||||||
<!-- The Response logicsheet (taglib) is an XSP logicsheet that wraps XML tags
|
|
||||||
around standard response operations -->
|
|
||||||
<builtin-logicsheet>
|
|
||||||
<parameter name="prefix" value="xsp-response"/>
|
|
||||||
<parameter name="uri" value="http://apache.org/xsp/response/2.0"/>
|
|
||||||
<parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/response.xsl"/>
|
|
||||||
</builtin-logicsheet>
|
|
||||||
|
|
||||||
<!-- The Session logicsheet (taglib) is an XSP logicsheet that wraps XML tags around
|
|
||||||
standard session operations. Specifically, the Session logicsheet provides an
|
|
||||||
XML interface to most methods of the HttpSession object (see the Java Servlet API
|
|
||||||
Specification, version 2.2 ) for more information. -->
|
|
||||||
<builtin-logicsheet>
|
|
||||||
<parameter name="prefix" value="session"/>
|
|
||||||
<parameter name="uri" value="http://apache.org/xsp/session/2.0"/>
|
|
||||||
<parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/session.xsl"/>
|
|
||||||
</builtin-logicsheet>
|
|
||||||
|
|
||||||
<builtin-logicsheet>
|
|
||||||
<parameter name="prefix" value="xsp-cookie"/>
|
|
||||||
<parameter name="uri" value="http://apache.org/xsp/cookie/2.0"/>
|
|
||||||
<parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/cookie.xsl"/>
|
|
||||||
</builtin-logicsheet>
|
|
||||||
|
|
||||||
<!-- The ESQL logicsheet is an XSP logicsheet that performs sql queries and
|
|
||||||
serializes their results as XML. This allows you to work with data from a
|
|
||||||
wide variety of different sources when using Apache Cocoon.
|
|
||||||
<builtin-logicsheet>
|
|
||||||
<parameter name="prefix" value="esql"/>
|
|
||||||
<parameter name="uri" value="http://apache.org/cocoon/SQL/v2"/>
|
|
||||||
<parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/esql.xsl"/>
|
|
||||||
</builtin-logicsheet>
|
|
||||||
-->
|
|
||||||
<builtin-logicsheet>
|
|
||||||
<parameter name="prefix" value="log"/>
|
|
||||||
<parameter name="uri" value="http://apache.org/xsp/log/2.0"/>
|
|
||||||
<parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/log.xsl"/>
|
|
||||||
</builtin-logicsheet>
|
|
||||||
|
|
||||||
<builtin-logicsheet>
|
|
||||||
<parameter name="prefix" value="util"/>
|
|
||||||
<parameter name="uri" value="http://apache.org/xsp/util/2.0"/>
|
|
||||||
<parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/util.xsl"/>
|
|
||||||
</builtin-logicsheet>
|
|
||||||
<!--
|
|
||||||
The xsp-formval taglib serves as interface to retrieve validation results
|
|
||||||
from a request attribute
|
|
||||||
<builtin-logicsheet>
|
|
||||||
<parameter name="prefix" value="xsp-formval"/>
|
|
||||||
<parameter name="uri" value="http://apache.org/xsp/form-validator/2.0"/>
|
|
||||||
<parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/form-validator.xsl"/>
|
|
||||||
</builtin-logicsheet>
|
|
||||||
|
|
||||||
The capture taglib is for capturing parts of the XSP-generated XML as
|
|
||||||
XML fragments or DOM nodes
|
|
||||||
<builtin-logicsheet>
|
|
||||||
<parameter name="prefix" value="capture"/>
|
|
||||||
<parameter name="uri" value="http://apache.org/cocoon/capture/1.0"/>
|
|
||||||
<parameter name="href" value="resource://org/apache/cocoon/components/language/markup/xsp/java/capture.xsl"/>
|
|
||||||
</builtin-logicsheet>
|
|
||||||
-->
|
|
||||||
</target-language>
|
|
||||||
</xsp-language>
|
|
||||||
|
|
||||||
<!-- Defines Sitemap Core logicsheet for the Java language -->
|
|
||||||
<sitemap-language name="sitemap">
|
|
||||||
<parameter name="prefix" value="map"/>
|
|
||||||
<parameter name="uri" value="http://apache.org/cocoon/sitemap/1.0"/>
|
|
||||||
|
|
||||||
<target-language name="java">
|
|
||||||
<parameter name="core-logicsheet" value="resource://org/apache/cocoon/components/language/markup/sitemap/java/sitemap.xsl"/>
|
|
||||||
</target-language>
|
|
||||||
</sitemap-language>
|
|
||||||
</markup-languages>
|
|
||||||
|
|
||||||
<!-- Stream Pipeline:
|
|
||||||
Either collects a Reader and lets it produce a character stream
|
|
||||||
or connects an EventPipeline with a Serializer and lets them produce
|
|
||||||
the character stream.
|
|
||||||
-->
|
|
||||||
<stream-pipeline class="org.apache.cocoon.components.pipeline.CachingStreamPipeline"
|
|
||||||
pool-max="32" pool-min="4" pool-grow="4"/>
|
|
||||||
|
|
||||||
<!-- Caching of stream pipeline:
|
|
||||||
freememory: Indicates how much memory should be left free in the
|
|
||||||
JVM for normal operation.
|
|
||||||
heapsize: Indicates how big the heap size can grow to before the
|
|
||||||
cleanup thread kicks in.
|
|
||||||
objectlifetime: Indicates how long (seconds) a cache object will
|
|
||||||
be hold in memory. The object will be thrown out,
|
|
||||||
when the time is over.
|
|
||||||
interval: Indicates the interval of the cleanup thread in seconds.
|
|
||||||
maxobjects: Indicates how many objects will be hold in the cache.
|
|
||||||
When the number of maxobjects has been reached. The
|
|
||||||
last object in the cache will be thrown out.
|
|
||||||
usethread: Indicates whether we use a cleanup thread or not.
|
|
||||||
threadpriority: Indicates the priority of the cleanup thread.
|
|
||||||
(1 is the lowest priority and 10 is the highest).
|
|
||||||
filesystem: Turns the filesystem storage for objects on or off.
|
|
||||||
-->
|
|
||||||
<stream-cache class="org.apache.cocoon.components.store.MRUMemoryStore" logger="root.store">
|
|
||||||
<parameter name="maxobjects" value="100"/>
|
|
||||||
<parameter name="threadpriority" value="5"/>
|
|
||||||
<parameter name="filesystem" value="true"/>
|
|
||||||
</stream-cache>
|
|
||||||
|
|
||||||
<!-- Event Pipeline:
|
|
||||||
Connects the generator and the various transformers and produces a
|
|
||||||
character stream. Alternatives to CachingEventPipeline are:
|
|
||||||
<event-pipeline class="org.apache.cocoon.components.pipeline.NonCachingEventPipeline"/>
|
|
||||||
-->
|
|
||||||
<event-pipeline class="org.apache.cocoon.components.pipeline.CachingEventPipeline"
|
|
||||||
pool-max="32" pool-min="4" pool-grow="4"/>
|
|
||||||
|
|
||||||
<!-- Caching of event pipeline:
|
|
||||||
freememory: Indicates how much memory should be left free in the
|
|
||||||
JVM for normal operation.
|
|
||||||
heapsize: Indicates how big the heap size can grow to before the
|
|
||||||
cleanup thread kicks in.
|
|
||||||
objectlifetime: Indicates how long (seconds) a cache object will
|
|
||||||
be hold in memory. The object will be thrown out,
|
|
||||||
when the time is over.
|
|
||||||
interval: Indicates the interval of the cleanup thread in seconds.
|
|
||||||
maxobjects: Indicates how many objects will be hold in the cache.
|
|
||||||
When the number of maxobjects has been reached. The
|
|
||||||
last object in the cache will be thrown out.
|
|
||||||
usethread: Indicates whether we use a cleanup thread or not.
|
|
||||||
threadpriority: Indicates the priority of the cleanup thread.
|
|
||||||
(1 is the lowest priority and 10 is the highest).
|
|
||||||
filesystem: Turns the filesystem storage for objects on or off.
|
|
||||||
-->
|
|
||||||
<event-cache class="org.apache.cocoon.components.store.MRUMemoryStore" logger="root.store">
|
|
||||||
<parameter name="maxobjects" value="100"/>
|
|
||||||
<parameter name="threadpriority" value="5"/>
|
|
||||||
<parameter name="filesystem" value="true"/>
|
|
||||||
</event-cache>
|
|
||||||
|
|
||||||
<!-- SAXConnector:
|
|
||||||
Connects the various pipeline components.
|
|
||||||
LoggingSAXConnector logs SAX events between pipeline components
|
|
||||||
into cocoon's log file.
|
|
||||||
Uncomment one of the following lines for using the SAXConnector.
|
|
||||||
<sax-connector class="org.apache.cocoon.components.saxconnector.LoggingSAXConnector"/>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- ======================== The sitemap ============================== -->
|
|
||||||
|
|
||||||
<!-- Reloading of the sitemap:
|
|
||||||
The check-reload attribute determines if the sitemap is reloaded on change.
|
|
||||||
Set to "no", the sitemap is generated once at startup.
|
|
||||||
Set to "yes", the sitemap is regenerated if it changes.
|
|
||||||
|
|
||||||
The reload-method specifies the method for the regeneration:
|
|
||||||
asynchron: If the sitemap changes, the sitemap is regenerated at the
|
|
||||||
next request in the background and the incoming request is
|
|
||||||
served with the old sitemap. All subsequent requests are
|
|
||||||
served with the old sitemap until the regeneration in the
|
|
||||||
background has finished.
|
|
||||||
synchron: If the sitemap changes, the sitemap is regenerated at the
|
|
||||||
next request. When the regeneration is finished, the request
|
|
||||||
(and all subsequent ones) is served with the new sitemap.
|
|
||||||
|
|
||||||
For development environment, set the reload-method to synchron and the
|
|
||||||
check-reload to yes.
|
|
||||||
For production environment, it is advisable to set the reload-method to
|
|
||||||
asynchron and for more safety the check-reload to no.
|
|
||||||
-->
|
|
||||||
<sitemap file="sitemap.xmap" reload-method="synchron" check-reload="no"/>
|
|
||||||
|
|
||||||
</cocoon>
|
|
Binary file not shown.
BIN
src/documentation/images/avalon-compatible.png
Normal file
BIN
src/documentation/images/avalon-compatible.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
BIN
src/documentation/images/built-with-cocoon.png
Normal file
BIN
src/documentation/images/built-with-cocoon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB |
BIN
src/documentation/images/krysalis-compatible.png
Normal file
BIN
src/documentation/images/krysalis-compatible.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.0 KiB |
@ -1,28 +0,0 @@
|
|||||||
The LinkAlarm report for xml.apache.org/cocoon/ is at
|
|
||||||
http://reports.linkalarm.com/373104199608/
|
|
||||||
|
|
||||||
LinkAlarm scans are run after each release to detect any
|
|
||||||
issues that need to be addressed prior to the next release.
|
|
||||||
|
|
||||||
The LinkAlarm report gives detailed HTML views of the situation
|
|
||||||
in an easy-to-read style. However, the summary file that is
|
|
||||||
explained below has concise info about actual broken links.
|
|
||||||
One other LinkAlarm page that is of special interest is the
|
|
||||||
"mailto:" validation page (those errors are not included in
|
|
||||||
the summary listing below).
|
|
||||||
|
|
||||||
To facilitate the management of link mending by the cocoon-dev
|
|
||||||
team, there is a summary file in the HEAD CVS at
|
|
||||||
documentation/linkalarm-broken.txt
|
|
||||||
This tab-delimited file has the following format ...
|
|
||||||
|
|
||||||
status problem_link referring_page response_code meaning comment
|
|
||||||
|
|
||||||
where "status" has these codes ...
|
|
||||||
- ... not yet addressed
|
|
||||||
F ... fixed
|
|
||||||
? ... has some issue (see the "comment" field)
|
|
||||||
[1-3] ... external link has been broken for n runs
|
|
||||||
|
|
||||||
To reduce duplication of effort, please update the "status"
|
|
||||||
tag for each issue that you might address.
|
|
@ -5,35 +5,16 @@
|
|||||||
<!-- =========================== Components ================================ -->
|
<!-- =========================== Components ================================ -->
|
||||||
|
|
||||||
<map:components>
|
<map:components>
|
||||||
|
<!-- Components used are declared in the cocoon tool section -->
|
||||||
|
|
||||||
<map:generators default="file">
|
<map:generators default="file"/> <!-- available: file, serverpages -->
|
||||||
<map:generator name="file" src="org.apache.cocoon.generation.FileGenerator" label="content"/>
|
<map:transformers default="xslt"/> <!-- available: xslt -->
|
||||||
<!-- FIXME: Change this once better view handling is implemented -->
|
<map:readers default="resource"/> <!-- available: resource -->
|
||||||
<map:generator name="file-nolabel" src="org.apache.cocoon.generation.FileGenerator"/>
|
<map:serializers default="html"/> <!-- available: html, xml, links -->
|
||||||
</map:generators>
|
<map:matchers default="wildcard">
|
||||||
|
|
||||||
<map:transformers default="xslt">
|
|
||||||
<map:transformer name="xslt" src="org.apache.cocoon.transformation.TraxTransformer">
|
|
||||||
<use-request-parameters>false</use-request-parameters>
|
|
||||||
<use-browser-capabilities-db>false</use-browser-capabilities-db>
|
|
||||||
</map:transformer>
|
|
||||||
</map:transformers>
|
|
||||||
|
|
||||||
<map:readers default="resource">
|
|
||||||
<map:reader name="resource" src="org.apache.cocoon.reading.ResourceReader"/>
|
|
||||||
</map:readers>
|
|
||||||
|
|
||||||
<map:serializers default="html">
|
|
||||||
<map:serializer name="html" mime-type="text/html" src="org.apache.cocoon.serialization.HTMLSerializer">
|
|
||||||
<encoding>iso8859-1</encoding>
|
|
||||||
</map:serializer>
|
|
||||||
<map:serializer name="xml" mime-type="text/xml" src="org.apache.cocoon.serialization.XMLSerializer"/>
|
|
||||||
<map:serializer name="links" src="org.apache.cocoon.serialization.LinkSerializer"/>
|
|
||||||
</map:serializers>
|
|
||||||
|
|
||||||
<map:matchers default="wildcard">
|
|
||||||
<map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
|
<map:matcher name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/>
|
||||||
</map:matchers>
|
</map:matchers>
|
||||||
|
|
||||||
</map:components>
|
</map:components>
|
||||||
|
|
||||||
<!-- =========================== Views =================================== -->
|
<!-- =========================== Views =================================== -->
|
||||||
@ -54,7 +35,7 @@
|
|||||||
|
|
||||||
<map:pipelines>
|
<map:pipelines>
|
||||||
|
|
||||||
<!-- C2 documentation pipeline -->
|
<!-- Documentation pipeline -->
|
||||||
<map:pipeline>
|
<map:pipeline>
|
||||||
<map:match pattern="">
|
<map:match pattern="">
|
||||||
<map:redirect-to uri="index.html"/>
|
<map:redirect-to uri="index.html"/>
|
||||||
@ -70,7 +51,7 @@
|
|||||||
</map:match>
|
</map:match>
|
||||||
|
|
||||||
<map:match pattern="body-todo.xml">
|
<map:match pattern="body-todo.xml">
|
||||||
<map:generate type="file-nolabel" src="xdocs/todo.xml"/>
|
<map:generate type="file" src="xdocs/todo.xml"/>
|
||||||
<map:transform src="stylesheets/todo2document.xsl" label="content"/>
|
<map:transform src="stylesheets/todo2document.xsl" label="content"/>
|
||||||
<map:transform src="stylesheets/document2docbook.xsl"/>
|
<map:transform src="stylesheets/document2docbook.xsl"/>
|
||||||
<map:transform src="stylesheets/docbook2body.xsl"/>
|
<map:transform src="stylesheets/docbook2body.xsl"/>
|
||||||
@ -78,7 +59,7 @@
|
|||||||
</map:match>
|
</map:match>
|
||||||
|
|
||||||
<map:match pattern="body-changes.xml">
|
<map:match pattern="body-changes.xml">
|
||||||
<map:generate type="file-nolabel" src="xdocs/changes.xml"/>
|
<map:generate type="file" src="xdocs/changes.xml"/>
|
||||||
<map:transform src="stylesheets/changes2document.xsl" label="content"/>
|
<map:transform src="stylesheets/changes2document.xsl" label="content"/>
|
||||||
<map:transform src="stylesheets/document2docbook.xsl"/>
|
<map:transform src="stylesheets/document2docbook.xsl"/>
|
||||||
<map:transform src="stylesheets/docbook2body.xsl"/>
|
<map:transform src="stylesheets/docbook2body.xsl"/>
|
||||||
@ -86,40 +67,13 @@
|
|||||||
</map:match>
|
</map:match>
|
||||||
|
|
||||||
<map:match pattern="body-faq.xml">
|
<map:match pattern="body-faq.xml">
|
||||||
<map:generate type="file-nolabel" src="xdocs/faq.xml"/>
|
<map:generate type="file" src="xdocs/faq.xml"/>
|
||||||
<map:transform src="stylesheets/faq2document.xsl" label="content"/>
|
<map:transform src="stylesheets/faq2document.xsl" label="content"/>
|
||||||
<map:transform src="stylesheets/document2docbook.xsl"/>
|
<map:transform src="stylesheets/document2docbook.xsl"/>
|
||||||
<map:transform src="stylesheets/docbook2body.xsl"/>
|
<map:transform src="stylesheets/docbook2body.xsl"/>
|
||||||
<map:serialize/>
|
<map:serialize/>
|
||||||
</map:match>
|
</map:match>
|
||||||
|
|
||||||
<!-- Generate the "doclist" - list of all documentation
|
|
||||||
The first match generates each book.xml and adds a new attribute "uri".
|
|
||||||
The second match aggregates each book.xml into a doclist and
|
|
||||||
then converts it to a document.
|
|
||||||
-->
|
|
||||||
<map:match pattern="doclist/xdocs/**book.xml">
|
|
||||||
<map:generate src="xdocs/{1}book.xml"/>
|
|
||||||
<map:transform src="stylesheets/doclist.xsl">
|
|
||||||
<map:parameter name="uri" value="{1}"/>
|
|
||||||
</map:transform>
|
|
||||||
<map:serialize type="xml"/>
|
|
||||||
</map:match>
|
|
||||||
<map:match pattern="body-doclist.xml">
|
|
||||||
<map:aggregate element="doclist">
|
|
||||||
<map:part src="cocoon:/doclist/xdocs/book.xml"/>
|
|
||||||
<map:part src="cocoon:/doclist/xdocs/plan/book.xml"/>
|
|
||||||
<map:part src="cocoon:/doclist/xdocs/poifs/book.xml"/>
|
|
||||||
<map:part src="cocoon:/doclist/xdocs/hdf/book.xml"/>
|
|
||||||
<map:part src="cocoon:/doclist/xdocs/hssf/book.xml"/>
|
|
||||||
<map:part src="cocoon:/doclist/xdocs/hpsf/book.xml"/>
|
|
||||||
<map:part src="cocoon:/doclist/xdocs/utils/book.xml"/>
|
|
||||||
</map:aggregate>
|
|
||||||
<map:transform src="stylesheets/doclist2document.xsl"/>
|
|
||||||
<map:transform src="stylesheets/document2html.xsl"/>
|
|
||||||
<map:serialize type="html"/>
|
|
||||||
</map:match>
|
|
||||||
|
|
||||||
<map:match pattern="body-**.xml">
|
<map:match pattern="body-**.xml">
|
||||||
<map:generate src="xdocs/{1}.xml"/>
|
<map:generate src="xdocs/{1}.xml"/>
|
||||||
<map:transform src="stylesheets/document2docbook.xsl"/>
|
<map:transform src="stylesheets/document2docbook.xsl"/>
|
||||||
@ -165,18 +119,10 @@
|
|||||||
|
|
||||||
<!-- ================ Static =========================== -->
|
<!-- ================ Static =========================== -->
|
||||||
|
|
||||||
<map:match pattern="**sample/**">
|
|
||||||
<map:read src="xdocs/{1}sample/{2}" mime-type="text/plain"/>
|
|
||||||
</map:match>
|
|
||||||
|
|
||||||
<map:match pattern="**.txt">
|
<map:match pattern="**.txt">
|
||||||
<map:read src="xdocs/{1}.txt" mime-type="text/plain"/>
|
<map:read src="xdocs/{1}.txt" mime-type="text/plain"/>
|
||||||
</map:match>
|
</map:match>
|
||||||
|
|
||||||
<map:match pattern="**resources/script.js">
|
|
||||||
<map:read src="stylesheets/script-cli.js" mime-type="application/javascript"/>
|
|
||||||
</map:match>
|
|
||||||
|
|
||||||
<map:match pattern="**resources/**.js">
|
<map:match pattern="**resources/**.js">
|
||||||
<map:read src="stylesheets/{2}.js" mime-type="application/javascript"/>
|
<map:read src="stylesheets/{2}.js" mime-type="application/javascript"/>
|
||||||
</map:match>
|
</map:match>
|
||||||
@ -197,15 +143,6 @@
|
|||||||
<map:read src="images/{2}.gif" mime-type="image/gif"/>
|
<map:read src="images/{2}.gif" mime-type="image/gif"/>
|
||||||
</map:match>
|
</map:match>
|
||||||
|
|
||||||
<map:match pattern="**graphics/**-*.jpg">
|
|
||||||
<map:generate src="svg/{3}.xml"/>
|
|
||||||
<map:transform src="svg/addlabel.xsl">
|
|
||||||
<map:parameter name="use-request-parameters" value="true"/>
|
|
||||||
<map:parameter name="label" value="{2}"/>
|
|
||||||
</map:transform>
|
|
||||||
<map:serialize type="svg2jpeg"/>
|
|
||||||
</map:match>
|
|
||||||
|
|
||||||
</map:pipeline>
|
</map:pipeline>
|
||||||
</map:pipelines>
|
</map:pipelines>
|
||||||
|
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<xsl:stylesheet version="1.0"
|
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
||||||
|
|
||||||
<xsl:template match="changes">
|
|
||||||
<xsl:variable name="file" select="concat('../', @file)"/>
|
|
||||||
<xsl:variable name="version" select="@version"/>
|
|
||||||
<xsl:apply-templates select="document($file)/changes/release[attribute::version=string($version)]"/>
|
|
||||||
</xsl:template>
|
|
||||||
</xsl:stylesheet>
|
|
@ -14,20 +14,16 @@
|
|||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="menu">
|
<xsl:template match="menu">
|
||||||
<font color="#000000" size="+1"><xsl:value-of select="@label"/></font>
|
<hr/>
|
||||||
<font size="-1">
|
<span class="s1"><xsl:value-of select="@label"/></span><br/>
|
||||||
<ul>
|
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
</ul>
|
|
||||||
</font><br/>
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="menu-item">
|
<xsl:template match="menu-item">
|
||||||
<xsl:if test="not(@type) or @type!='hidden'">
|
<xsl:if test="not(@type) or @type!='hidden'">
|
||||||
<li><a href="{@href}"><font size="-1"><xsl:value-of select="@label"/></font></a></li>
|
<a href="{@href}" class="s1"><xsl:value-of select="@label"/></a><br/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="node()|@*" priority="-1"/>
|
<xsl:template match="node()|@*" priority="-1"/>
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
|
||||||
|
@ -6,16 +6,31 @@
|
|||||||
<xsl:template match="book">
|
<xsl:template match="book">
|
||||||
<body>
|
<body>
|
||||||
<title><xsl:value-of select="title"/></title>
|
<title><xsl:value-of select="title"/></title>
|
||||||
<center>
|
<table class="centered" align="center" width="100%">
|
||||||
<table width="80%">
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="#F3DD61">
|
<td align="center">
|
||||||
<br/><center><b><xsl:value-of select="title"/><xsl:if test="subtitle"><xsl:text>: </xsl:text><xsl:value-of select="subtitle"/></xsl:if></b></center>
|
<table class="title" cellspacing="0" cellpadding="1" border="0">
|
||||||
<br/>
|
<tbody>
|
||||||
</td>
|
<tr>
|
||||||
</tr>
|
<td bgcolor="#525d76">
|
||||||
</table>
|
<table class="centered" cellspacing="0" cellpadding="2" border="0" width="100%">
|
||||||
</center><br/>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#f3dd61">
|
||||||
|
<span class="title"><xsl:value-of select="title"/><xsl:if test="subtitle"><xsl:text>: </xsl:text><xsl:value-of select="subtitle"/></xsl:if></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
<xsl:apply-templates select="dedication"/>
|
<xsl:apply-templates select="dedication"/>
|
||||||
<xsl:apply-templates select="bookinfo"/>
|
<xsl:apply-templates select="bookinfo"/>
|
||||||
</body>
|
</body>
|
||||||
@ -25,15 +40,31 @@
|
|||||||
<body>
|
<body>
|
||||||
<xsl:if test="normalize-space(title)!=''">
|
<xsl:if test="normalize-space(title)!=''">
|
||||||
<title><xsl:value-of select="title"/></title>
|
<title><xsl:value-of select="title"/></title>
|
||||||
<center>
|
<table class="centered" align="center" width="100%">
|
||||||
<table width="80%">
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td bgcolor="#F3DD61">
|
<td align="center">
|
||||||
<font size="+1" face="Arial,sans-serif"><center><b><xsl:value-of select="title"/></b></center></font>
|
<table class="title" cellspacing="0" cellpadding="1" border="0">
|
||||||
</td>
|
<tbody>
|
||||||
</tr>
|
<tr>
|
||||||
</table>
|
<td bgcolor="#525d76">
|
||||||
</center>
|
<table class="centered" cellspacing="0" cellpadding="2" border="0" width="100%">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#f3dd61">
|
||||||
|
<span class="title"><xsl:value-of select="title"/></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
||||||
<xsl:if test="subtitle">
|
<xsl:if test="subtitle">
|
||||||
@ -58,7 +89,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<xsl:apply-templates select="para"/>
|
<xsl:apply-templates select="para"/>
|
||||||
<br/>
|
|
||||||
|
|
||||||
<xsl:apply-templates select="section">
|
<xsl:apply-templates select="section">
|
||||||
<xsl:with-param name="level" select="1"/>
|
<xsl:with-param name="level" select="1"/>
|
||||||
@ -424,13 +455,6 @@
|
|||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="entry[@role='th']">
|
|
||||||
<td align="center" bgcolor="#006CB8" valign="top"
|
|
||||||
style="font-weight: bold">
|
|
||||||
<font color="#ffffff" size="-1"><xsl:apply-templates/></font>
|
|
||||||
</td>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="entry">
|
<xsl:template match="entry">
|
||||||
<td align="left" bgcolor="#a0ddf0" valign="top">
|
<td align="left" bgcolor="#a0ddf0" valign="top">
|
||||||
<font color="#000000" size="-1"><xsl:apply-templates/></font>
|
<font color="#000000" size="-1"><xsl:apply-templates/></font>
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<xsl:stylesheet
|
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
||||||
version="1.0">
|
|
||||||
|
|
||||||
<xsl:param name="uri"/>
|
|
||||||
|
|
||||||
<xsl:template match="book">
|
|
||||||
<book title="{@title}" uri="{$uri}">
|
|
||||||
<xsl:copy-of select="node()"/>
|
|
||||||
</book>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
@ -1,85 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<xsl:stylesheet
|
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
||||||
version="1.0">
|
|
||||||
|
|
||||||
<xsl:template match="doclist">
|
|
||||||
<document>
|
|
||||||
<header>
|
|
||||||
<title>List of all documentation</title>
|
|
||||||
</header>
|
|
||||||
<body>
|
|
||||||
<s1 title="Documentation List">
|
|
||||||
<p>
|
|
||||||
This complete list shows, at a glance, how all of the documentation
|
|
||||||
fits together within the hierarchy of sections.
|
|
||||||
<!-- For an overview of the documentation see the new
|
|
||||||
"Table of Contents". -->
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The side-panel of each actual document is used to reach other documents
|
|
||||||
that are relevant to that section. The side-panel will change, according
|
|
||||||
to that section's location in the documentation hierarchy.
|
|
||||||
</p>
|
|
||||||
</s1>
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</body>
|
|
||||||
</document>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="book">
|
|
||||||
<s1 title="{@title}">
|
|
||||||
<xsl:if test="position()=1">
|
|
||||||
<p>This first section is a list of the top-level documentation
|
|
||||||
(and is a replica of this page's side-panel).</p>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</s1>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="menu">
|
|
||||||
<xsl:if test="@label!='Navigation'">
|
|
||||||
<p><strong><xsl:value-of select="@label"/></strong></p>
|
|
||||||
<ul>
|
|
||||||
<xsl:apply-templates>
|
|
||||||
<xsl:with-param name="uri" select="../@uri"/>
|
|
||||||
</xsl:apply-templates>
|
|
||||||
</ul>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="menu-item">
|
|
||||||
<xsl:param name="uri"/>
|
|
||||||
<xsl:if test="not(@type) or @type!='hidden'">
|
|
||||||
<xsl:if test="@label!='Main' and @label!='User Documentation'">
|
|
||||||
<!-- FIXME: ensure href is not full URL scheme:// -->
|
|
||||||
<!--
|
|
||||||
(uri=<xsl:value-of select="$uri"/> href=<xsl:value-of select="@href"/>)
|
|
||||||
-->
|
|
||||||
<li><link href="{$uri}{@href}"><xsl:value-of select="@label"/></link>
|
|
||||||
</li>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="external">
|
|
||||||
<xsl:param name="uri"/>
|
|
||||||
<xsl:if test="not(@type) or @type!='hidden'">
|
|
||||||
<xsl:choose>
|
|
||||||
<!-- FIXME: specially handle menu item "API (Javadoc)", it causes a bug. -->
|
|
||||||
<xsl:when test="starts-with(@label,'API')">
|
|
||||||
<li><link href="http://xml.apache.org/cocoon/apidocs/"><xsl:value-of select="@label"/></link></li>
|
|
||||||
<!-- FIXME: here is the bug:
|
|
||||||
<li><link href="{@href}"><xsl:value-of select="@label"/></link></li>
|
|
||||||
<li><xsl:value-of select="@label"/>href=<xsl:value-of select="@href"/></li>
|
|
||||||
-->
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<li><link href="{@href}"><xsl:value-of select="@label"/></link></li>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
@ -144,7 +144,11 @@
|
|||||||
<table>
|
<table>
|
||||||
<tgroup>
|
<tgroup>
|
||||||
<xsl:attribute name="cols"><xsl:value-of select="count(tr/td)"/></xsl:attribute>
|
<xsl:attribute name="cols"><xsl:value-of select="count(tr/td)"/></xsl:attribute>
|
||||||
<xsl:apply-templates select="th"/>
|
<xsl:if test="th">
|
||||||
|
<thead>
|
||||||
|
<xsl:apply-templates select="th"/>
|
||||||
|
</thead>
|
||||||
|
</xsl:if>
|
||||||
<tbody>
|
<tbody>
|
||||||
<xsl:apply-templates select="tr"/>
|
<xsl:apply-templates select="tr"/>
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -152,13 +156,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="th">
|
<xsl:template match="th|tr">
|
||||||
<entry role="th">
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</entry>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="tr">
|
|
||||||
<row>
|
<row>
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
</row>
|
</row>
|
||||||
@ -176,3 +174,4 @@
|
|||||||
</xsl:copy>
|
</xsl:copy>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
|
||||||
|
@ -1,389 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<xsl:stylesheet
|
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
||||||
version="1.0">
|
|
||||||
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
<!-- document section -->
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
|
|
||||||
<xsl:template match="/">
|
|
||||||
<!-- checks if this is the included document to avoid neverending loop -->
|
|
||||||
<xsl:if test="not(book)">
|
|
||||||
<document>
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="document/header/title">
|
|
||||||
<title><xsl:value-of select="document/header/title"/></title>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<title>NO TITLE</title>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
<body text="#000000" link="#039acc" vlink="#0086b2" alink="#cc0000"
|
|
||||||
topmargin="4" leftmargin="4" marginwidth="4" marginheight="4"
|
|
||||||
bgcolor="#ffffff">
|
|
||||||
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</document>
|
|
||||||
</xsl:if>
|
|
||||||
|
|
||||||
<xsl:if test="book">
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
<!-- header section -->
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
|
|
||||||
<xsl:template match="header">
|
|
||||||
<!-- ignore on general document -->
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
<!-- body section -->
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
|
|
||||||
<xsl:template match="s1">
|
|
||||||
<div align="right">
|
|
||||||
<table border="0" width="98%" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td width="9" height="7" valign="bottom" align="right"><img src="images/bar-top-left.gif" width="9" height="7" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td background="images/bar-border-top.gif"><img src="images/void.gif" width="1" height="5" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td width="9" height="7" valign="bottom" align="left"><img src="images/bar-top-right.gif" width="9" height="7" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="9" background="images/bar-border-left.gif"><img src="images/void.gif" width="9" height="1" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td width="100%" bgcolor="#0086b2">
|
|
||||||
<font size="+1" face="arial,helvetica,sanserif" color="#ffffff">
|
|
||||||
<img src="images/void.gif" width="5" height="5" vspace="0" hspace="0" border="0"/><b><xsl:value-of select="@title"/></b></font>
|
|
||||||
</td>
|
|
||||||
<td width="9" background="images/bar-border-right.gif"><img src="images/void.gif" width="9" height="1" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="9" height="12" valign="top" align="right"><img src="images/bar-bottom-left.gif" width="9" height="12" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td background="images/bar-border-bottom.gif"><img src="images/void.gif" height="12" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td width="9" height="12" valign="top" align="left"><img src="images/bar-bottom-right.gif" width="9" height="12" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<table border="0" width="98%" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<font face="arial,helvetica,sanserif" color="#000000"><xsl:apply-templates/></font>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<br/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="s2">
|
|
||||||
<div align="right">
|
|
||||||
<table border="0" width="95%" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td width="9" height="7" valign="bottom" align="right"><img src="images/bar-top-left.gif" width="9" height="7" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td background="images/bar-border-top.gif"><img src="images/void.gif" width="1" height="5" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td width="9" height="7" valign="bottom" align="left"><img src="images/bar-top-right.gif" width="9" height="7" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="9" background="images/bar-border-left.gif"><img src="images/void.gif" width="9" height="1" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td width="100%" bgcolor="#0086b2">
|
|
||||||
<font face="arial,helvetica,sanserif" color="#ffffff">
|
|
||||||
<img src="images/void.gif" width="5" height="5" vspace="0" hspace="0" border="0"/><b><xsl:value-of select="@title"/></b></font>
|
|
||||||
</td>
|
|
||||||
<td width="9" background="images/bar-border-right.gif"><img src="images/void.gif" width="9" height="1" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="9" height="12" valign="top" align="right"><img src="images/bar-bottom-left.gif" width="9" height="12" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td background="images/bar-border-bottom.gif"><img src="images/void.gif" width="1" height="12" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td width="9" height="12" valign="top" align="left"><img src="images/bar-bottom-right.gif" width="9" height="12" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<table border="0" width="95%" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<font face="arial,helvetica,sanserif" color="#000000"><xsl:apply-templates/></font>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<br/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="s3">
|
|
||||||
<div align="right">
|
|
||||||
<table border="0" width="90%" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td width="9" height="7" valign="bottom" align="right"><img src="images/bar-top-left.gif" width="9" height="7" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td background="images/bar-border-top.gif"><img src="images/void.gif" width="1" height="5" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td width="9" height="7" valign="bottom" align="left"><img src="images/bar-top-right.gif" width="9" height="7" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="9" background="images/bar-border-left.gif"><img src="images/void.gif" width="9" height="1" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td width="100%" bgcolor="#0086b2">
|
|
||||||
<font size="-1" face="arial,helvetica,sanserif" color="#ffffff">
|
|
||||||
<img src="images/void.gif" width="5" height="5" vspace="0" hspace="0" border="0"/><b><xsl:value-of select="@title"/></b></font>
|
|
||||||
</td>
|
|
||||||
<td width="9" background="images/bar-border-right.gif"><img src="images/void.gif" width="9" height="1" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="9" height="12" valign="top" align="right"><img src="images/bar-bottom-left.gif" width="9" height="12" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td background="images/bar-border-bottom.gif"><img src="images/void.gif" width="1" height="12" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td width="9" height="12" valign="top" align="left"><img src="images/bar-bottom-right.gif" width="9" height="12" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<table border="0" width="90%" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<font face="arial,helvetica,sanserif" color="#000000"><xsl:apply-templates/></font>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<br/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="s4">
|
|
||||||
<div align="right">
|
|
||||||
<table border="0" width="85%" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td width="9" height="7" valign="bottom" align="right"><img src="images/bar-top-left.gif" width="9" height="7" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td background="images/bar-border-top.gif"><img src="images/void.gif" width="1" height="5" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td width="9" height="7" valign="bottom" align="left"><img src="images/bar-top-right.gif" width="9" height="7" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="9" background="images/bar-border-left.gif"><img src="images/void.gif" width="9" height="1" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td width="100%" bgcolor="#0086b2">
|
|
||||||
<font size="-2" face="arial,helvetica,sanserif" color="#ffffff">
|
|
||||||
<img src="images/void.gif" width="5" height="5" vspace="0" hspace="0" border="0"/><b><xsl:value-of select="@title"/></b></font>
|
|
||||||
</td>
|
|
||||||
<td width="9" background="images/bar-border-right.gif"><img src="images/void.gif" width="9" height="1" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td width="9" height="12" valign="top" align="right"><img src="images/bar-bottom-left.gif" width="9" height="12" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td background="images/bar-border-bottom.gif"><img src="images/void.gif" width="1" height="12" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td width="9" height="12" valign="top" align="left"><img src="images/bar-bottom-right.gif" width="9" height="12" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<table border="0" width="85%" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<font face="arial,helvetica,sanserif" color="#000000"><xsl:apply-templates/></font>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<br/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
<!-- footer section -->
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
|
|
||||||
<xsl:template match="footer">
|
|
||||||
<!-- ignore on general documents -->
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
<!-- paragraph section -->
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
|
|
||||||
<xsl:template match="p">
|
|
||||||
<p align="justify"><xsl:apply-templates/></p>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="note">
|
|
||||||
<p>
|
|
||||||
<table width="100%" cellspacing="3" cellpadding="0" border="0">
|
|
||||||
<tr>
|
|
||||||
<td width="28" valign="top">
|
|
||||||
<img src="images/note.gif" width="28" height="29" vspace="0" hspace="0" border="0" alt="Note"/>
|
|
||||||
</td>
|
|
||||||
<td valign="top">
|
|
||||||
<font size="-1" face="arial,helvetica,sanserif" color="#000000">
|
|
||||||
<i>
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</i>
|
|
||||||
</font>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</p>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="source">
|
|
||||||
<div align="center">
|
|
||||||
<table cellspacing="4" cellpadding="0" border="0">
|
|
||||||
<tr>
|
|
||||||
<td bgcolor="#0086b2" width="1" height="1"><img src="images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td bgcolor="#0086b2" height="1"><img src="images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td bgcolor="#0086b2" width="1" height="1"><img src="images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td bgcolor="#0086b2" width="1"><img src="images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td bgcolor="#ffffff"><pre><xsl:apply-templates/></pre></td>
|
|
||||||
<td bgcolor="#0086b2" width="1"><img src="images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td bgcolor="#0086b2" width="1" height="1"><img src="images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td bgcolor="#0086b2" height="1"><img src="images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
<td bgcolor="#0086b2" width="1" height="1"><img src="images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="fixme">
|
|
||||||
<!-- ignore on documentation -->
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
<!-- list section -->
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
|
|
||||||
<xsl:template match="ul|ol|dl">
|
|
||||||
<blockquote>
|
|
||||||
<xsl:copy>
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</xsl:copy>
|
|
||||||
</blockquote>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="li">
|
|
||||||
<xsl:copy>
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</xsl:copy>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="sl">
|
|
||||||
<ul>
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</ul>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="dt">
|
|
||||||
<li>
|
|
||||||
<strong><xsl:value-of select="."/></strong>
|
|
||||||
<xsl:text> - </xsl:text>
|
|
||||||
<xsl:apply-templates select="dd"/>
|
|
||||||
</li>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
<!-- table section -->
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
|
|
||||||
<xsl:template match="table">
|
|
||||||
<table width="100%" border="0" cellspacing="2" cellpadding="2">
|
|
||||||
<caption><xsl:value-of select="caption"/></caption>
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</table>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="tr">
|
|
||||||
<tr><xsl:apply-templates/></tr>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="th">
|
|
||||||
<td bgcolor="#039acc" colspan="{@colspan}" rowspan="{@rowspan}" valign="center" align="center">
|
|
||||||
<font color="#ffffff" size="-1" face="arial,helvetica,sanserif">
|
|
||||||
<b><xsl:apply-templates/></b> 
|
|
||||||
</font>
|
|
||||||
</td>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="td">
|
|
||||||
<td bgcolor="#a0ddf0" colspan="{@colspan}" rowspan="{@rowspan}" valign="top" align="left">
|
|
||||||
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
|
|
||||||
<xsl:apply-templates/> 
|
|
||||||
</font>
|
|
||||||
</td>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="tn">
|
|
||||||
<td bgcolor="#ffffff" colspan="{@colspan}" rowspan="{@rowspan}">
|
|
||||||
 
|
|
||||||
</td>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="caption">
|
|
||||||
<!-- ignore since already used -->
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
<!-- markup section -->
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
|
|
||||||
<xsl:template match="strong">
|
|
||||||
<b><xsl:apply-templates/></b>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="em">
|
|
||||||
<i><xsl:apply-templates/></i>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="code">
|
|
||||||
<code><font face="courier, monospaced"><xsl:apply-templates/></font></code>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
<!-- images section -->
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
|
|
||||||
<xsl:template match="figure">
|
|
||||||
<p align="center">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="string(@width) and string(@height)">
|
|
||||||
<img src="{@src}" alt="{@alt}" width="{@width}" height="{@height}" border="0" vspace="4" hspace="4"/>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<img src="{@src}" alt="{@alt}" border="0" vspace="4" hspace="4"/>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</p>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="img">
|
|
||||||
<img src="{@src}" alt="{@alt}" border="0" vspace="4" hspace="4" align="right"/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="icon">
|
|
||||||
<img src="{@src}" alt="{@alt}" border="0" align="absmiddle"/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
<!-- links section -->
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
|
|
||||||
<xsl:template match="link">
|
|
||||||
<a href="{@href}"><xsl:apply-templates/></a>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="connect">
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="jump">
|
|
||||||
<a href="{@href}#{@anchor}"><xsl:apply-templates/></a>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="fork">
|
|
||||||
<a href="{@href}" target="_blank"><xsl:apply-templates/></a>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="anchor">
|
|
||||||
<a name="{@id}"><xsl:comment>anchor</xsl:comment></a>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
<!-- specials section -->
|
|
||||||
<!-- ====================================================================== -->
|
|
||||||
|
|
||||||
<xsl:template match="br">
|
|
||||||
<br/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
1
src/documentation/stylesheets/announcement2txt.xsl → src/documentation/stylesheets/projectinfo2announcement.xsl
Executable file → Normal file
1
src/documentation/stylesheets/announcement2txt.xsl → src/documentation/stylesheets/projectinfo2announcement.xsl
Executable file → Normal file
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
<xsl:stylesheet version="1.0"
|
<xsl:stylesheet version="1.0"
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||||
<xsl:import href="announcement.xsl"/>
|
|
||||||
<xsl:output method="text" indent="no"/>
|
<xsl:output method="text" indent="no"/>
|
||||||
|
|
||||||
<xsl:template match="announcement">
|
<xsl:template match="announcement">
|
107
src/documentation/stylesheets/projectinfo2todo.xsl
Normal file
107
src/documentation/stylesheets/projectinfo2todo.xsl
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<xsl:stylesheet version="1.0"
|
||||||
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||||
|
<xsl:output method="text" indent="no"/>
|
||||||
|
|
||||||
|
<xsl:template match="announcement">
|
||||||
|
<xsl:variable name="titlelen" select="string-length(project)+9"/>
|
||||||
|
<text>
|
||||||
|
<xsl:value-of select="project"/><xsl:text> Released
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:call-template name="line">
|
||||||
|
<xsl:with-param name="len" select="$titlelen"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="abstract"/>
|
||||||
|
<xsl:apply-templates select="body"/>
|
||||||
|
<xsl:text>
|
||||||
|
For more information about </xsl:text>
|
||||||
|
<xsl:value-of select="project"/>
|
||||||
|
<xsl:text>, please go to
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:value-of select="@site"/>
|
||||||
|
<xsl:text>
|
||||||
|
|
||||||
|
Changes with </xsl:text>
|
||||||
|
<xsl:value-of select="project"/>
|
||||||
|
<xsl:text>
|
||||||
|
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="changes"/>
|
||||||
|
</text>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="project"/>
|
||||||
|
<xsl:template match="title"/>
|
||||||
|
|
||||||
|
<xsl:template match="subproject">
|
||||||
|
<xsl:variable name="titlelen" select="string-length(title)"/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:value-of select="title"/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:call-template name="line">
|
||||||
|
<xsl:with-param name="len" select="$titlelen"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="abstract"/>
|
||||||
|
<xsl:text>
|
||||||
|
For more information about </xsl:text>
|
||||||
|
<xsl:value-of select="title"/>
|
||||||
|
<xsl:text>, please go to
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:value-of select="@site"/>
|
||||||
|
<xsl:text>
|
||||||
|
|
||||||
|
Changes with </xsl:text>
|
||||||
|
<xsl:value-of select="title"/>
|
||||||
|
<xsl:text>
|
||||||
|
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="changes"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="abstract">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="p">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="link">
|
||||||
|
<xsl:value-of select="."/>
|
||||||
|
<xsl:text> (</xsl:text>
|
||||||
|
<xsl:value-of select="@href"/>
|
||||||
|
<xsl:text>)</xsl:text>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="release">
|
||||||
|
<xsl:for-each select="action">
|
||||||
|
<xsl:text>*) </xsl:text>
|
||||||
|
<xsl:value-of select="normalize-space(.)"/><xsl:text> </xsl:text>
|
||||||
|
<xsl:if test="@dev">
|
||||||
|
<xsl:text>[</xsl:text>
|
||||||
|
<xsl:value-of select="@dev"/>
|
||||||
|
<xsl:text>]</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:text>
|
||||||
|
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:for-each>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template name="line">
|
||||||
|
<xsl:param name="len"/>
|
||||||
|
<xsl:if test="number($len) > 0">
|
||||||
|
<xsl:text>-</xsl:text>
|
||||||
|
<xsl:call-template name="line">
|
||||||
|
<xsl:with-param name="len" select="number($len)-1"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
</xsl:stylesheet>
|
107
src/documentation/stylesheets/projectinfo2txt.xsl
Normal file
107
src/documentation/stylesheets/projectinfo2txt.xsl
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<xsl:stylesheet version="1.0"
|
||||||
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||||
|
<xsl:output method="text" indent="no"/>
|
||||||
|
|
||||||
|
<xsl:template match="announcement">
|
||||||
|
<xsl:variable name="titlelen" select="string-length(project)+9"/>
|
||||||
|
<text>
|
||||||
|
<xsl:value-of select="project"/><xsl:text> Released
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:call-template name="line">
|
||||||
|
<xsl:with-param name="len" select="$titlelen"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="abstract"/>
|
||||||
|
<xsl:apply-templates select="body"/>
|
||||||
|
<xsl:text>
|
||||||
|
For more information about </xsl:text>
|
||||||
|
<xsl:value-of select="project"/>
|
||||||
|
<xsl:text>, please go to
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:value-of select="@site"/>
|
||||||
|
<xsl:text>
|
||||||
|
|
||||||
|
Changes with </xsl:text>
|
||||||
|
<xsl:value-of select="project"/>
|
||||||
|
<xsl:text>
|
||||||
|
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="changes"/>
|
||||||
|
</text>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="project"/>
|
||||||
|
<xsl:template match="title"/>
|
||||||
|
|
||||||
|
<xsl:template match="subproject">
|
||||||
|
<xsl:variable name="titlelen" select="string-length(title)"/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:value-of select="title"/>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:call-template name="line">
|
||||||
|
<xsl:with-param name="len" select="$titlelen"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:text>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="abstract"/>
|
||||||
|
<xsl:text>
|
||||||
|
For more information about </xsl:text>
|
||||||
|
<xsl:value-of select="title"/>
|
||||||
|
<xsl:text>, please go to
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:value-of select="@site"/>
|
||||||
|
<xsl:text>
|
||||||
|
|
||||||
|
Changes with </xsl:text>
|
||||||
|
<xsl:value-of select="title"/>
|
||||||
|
<xsl:text>
|
||||||
|
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:apply-templates select="changes"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="abstract">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="p">
|
||||||
|
<xsl:apply-templates/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="link">
|
||||||
|
<xsl:value-of select="."/>
|
||||||
|
<xsl:text> (</xsl:text>
|
||||||
|
<xsl:value-of select="@href"/>
|
||||||
|
<xsl:text>)</xsl:text>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="release">
|
||||||
|
<xsl:for-each select="action">
|
||||||
|
<xsl:text>*) </xsl:text>
|
||||||
|
<xsl:value-of select="normalize-space(.)"/><xsl:text> </xsl:text>
|
||||||
|
<xsl:if test="@dev">
|
||||||
|
<xsl:text>[</xsl:text>
|
||||||
|
<xsl:value-of select="@dev"/>
|
||||||
|
<xsl:text>]</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:text>
|
||||||
|
|
||||||
|
</xsl:text>
|
||||||
|
</xsl:for-each>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template name="line">
|
||||||
|
<xsl:param name="len"/>
|
||||||
|
<xsl:if test="number($len) > 0">
|
||||||
|
<xsl:text>-</xsl:text>
|
||||||
|
<xsl:call-template name="line">
|
||||||
|
<xsl:with-param name="len" select="number($len)-1"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
</xsl:stylesheet>
|
@ -1,27 +0,0 @@
|
|||||||
rolloverImagesOn=new Array();
|
|
||||||
rolloverImagesOff=new Array();
|
|
||||||
|
|
||||||
function rolloverOn(name) {
|
|
||||||
if(document.images[name] && rolloverImagesOn[name]) document.images[name].src=rolloverImagesOn[name].src;
|
|
||||||
}
|
|
||||||
|
|
||||||
function rolloverOff(name) {
|
|
||||||
if(document.images[name] && rolloverImagesOff[name]) document.images[name].src=rolloverImagesOff[name].src;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function rolloverLoad(name,on,off) {
|
|
||||||
rolloverImagesOn[name]=new Image();
|
|
||||||
rolloverImagesOn[name].src=mangle(on);
|
|
||||||
rolloverImagesOff[name]=new Image();
|
|
||||||
rolloverImagesOff[name].src=mangle(off);
|
|
||||||
}
|
|
||||||
|
|
||||||
function mangle(name) {
|
|
||||||
|
|
||||||
name = name.replace(/:/g, "_");
|
|
||||||
name = name.replace(/\?/g, "_");
|
|
||||||
name = name.replace(/\"/g, "\'");
|
|
||||||
|
|
||||||
return name;
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
rolloverImagesOn=new Array();
|
|
||||||
rolloverImagesOff=new Array();
|
|
||||||
|
|
||||||
function rolloverOn(name) {
|
|
||||||
if(document.images[name] && rolloverImagesOn[name]) document.images[name].src=rolloverImagesOn[name].src;
|
|
||||||
}
|
|
||||||
|
|
||||||
function rolloverOff(name) {
|
|
||||||
if(document.images[name] && rolloverImagesOff[name]) document.images[name].src=rolloverImagesOff[name].src;
|
|
||||||
}
|
|
||||||
|
|
||||||
function rolloverLoad(name,on,off) {
|
|
||||||
rolloverImagesOn[name]=new Image();
|
|
||||||
rolloverImagesOn[name].src=on;
|
|
||||||
rolloverImagesOff[name]=new Image();
|
|
||||||
rolloverImagesOff[name].src=off;
|
|
||||||
}
|
|
@ -2,66 +2,85 @@
|
|||||||
|
|
||||||
<html xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
<html xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
xsl:version="1.0">
|
xsl:version="1.0">
|
||||||
<head><title><xsl:value-of select="/site/body/title"/></title></head>
|
<head>
|
||||||
<body text="#000000" link="#525D76" vlink="#023264" alink="#023264"
|
<meta content="text/html; charset=ISO-8859-1"/>
|
||||||
topmargin="4" leftmargin="4" marginwidth="4" marginheight="4"
|
<title><xsl:value-of select="/site/body/title"/></title>
|
||||||
bgcolor="#ffffff">
|
<style type="text/css">
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
<![CDATA[ body { background-color: white; font-size: normal; color: black ; }
|
||||||
<tr>
|
a { color: #525d76; }
|
||||||
<td valign="top" align="left">
|
a.black { color: #000000;}
|
||||||
<a href="http://jakarta.apache.org/index.html">
|
table {border-width: 0; width: 100%}
|
||||||
<img hspace="0" vspace="0" border="0" src="images/jakarta-logo.gif"/>
|
table.centered {text-align: center}
|
||||||
</a>
|
table.title {text-align: center; width: 80%}
|
||||||
</td>
|
img{border-width: 0;}
|
||||||
<td width="100%" valign="top" align="left" bgcolor="#ffffff">
|
span.s1 {font-family: Helvetica, Arial, sans-serif; font-weight: bold; color: #000000; }
|
||||||
<img hspace="0"
|
span.s1_white { font-family: Helvetica, Arial, sans-serif; font-weight: bold; color: #ffffff; }
|
||||||
vspace="0"
|
span.title {font-family: Helvetica, Arial, sans-serif; font-weight: bold; color: #000000; }
|
||||||
border="0"
|
span.c1 {color: #000000; font-family: Helvetica, Arial, sans-serif}
|
||||||
align="right"
|
tr.left {text-align: left}
|
||||||
src="images/header.gif"/>
|
hr { width: 100%; size: 2} ]]>
|
||||||
</td>
|
</style>
|
||||||
</tr>
|
</head>
|
||||||
<tr>
|
<body>
|
||||||
<td width="100%" height="2" colspan="2"><hr noshade="" size="1"/></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
<!-- header -->
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td align="left" valign="top"><a href="http://jakarta.apache.org/index.html"><img src="images/jakarta-logo.gif" border="0" vspace="0" hspace="0"/></a></td><td bgcolor="#ffffff" align="left" valign="top" width="100%"><img src="images/header.gif" align="right" border="0" vspace="0" hspace="0"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#525d76" colspan="2"><span class="c1"><a href="http://www.apache.org/" class="black">www.apache.org ></a><a href="http://jakarta.apache.org/" class="black">jakarta.apache.org ></a><a class="black" href="http://jakarta.apache.org/poi/">jakarta.apache.org/poi</a></span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td height="8"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<!-- main -->
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td width="1%" valign="top"/>
|
<!-- left menu -->
|
||||||
|
<td width="1%"><br/></td>
|
||||||
<td width="14%" valign="top" nowrap="1">
|
<td width="14%" valign="top" nowrap="1">
|
||||||
<br/>
|
<xsl:copy-of select="/site/menu/node()|@*"/>
|
||||||
<font face="arial,helvetica,sanserif">
|
|
||||||
<br/>
|
|
||||||
<xsl:copy-of select="/site/menu/node()|@*"/>
|
|
||||||
<br/>
|
|
||||||
</font>
|
|
||||||
</td>
|
</td>
|
||||||
|
<td width="1%"><br/></td>
|
||||||
|
|
||||||
|
<!-- contents -->
|
||||||
<td width="*" valign="top" align="left">
|
<td width="*" valign="top" align="left">
|
||||||
<xsl:copy-of select="/site/body/node()|@*"/>
|
<xsl:copy-of select="/site/body/node()|@*"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<br/>
|
<br/>
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
||||||
<tr><td><hr noshade="" size="1"/></td></tr>
|
<!-- footer -->
|
||||||
<tr>
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||||
<td align="center">
|
<tbody>
|
||||||
<font face="arial,helvetica,sanserif" size="-1" color="#525D76">
|
<tr>
|
||||||
<i>
|
<td>
|
||||||
Copyright ©2002 Apache Software Foundation
|
<hr size="1" noshade=""/>
|
||||||
</i>
|
</td>
|
||||||
</font>
|
</tr>
|
||||||
</td>
|
<tr>
|
||||||
<td align="right" width="5%">
|
<td align="center">
|
||||||
<img hspace="0"
|
<i>Copyright © 2002 Apache Software Foundation</i>
|
||||||
vspace="0"
|
</td>
|
||||||
border="0"
|
</tr>
|
||||||
align="right"
|
<tr>
|
||||||
src="images/cocoon2-small.jpg"/>
|
<td width="100%" align="right">
|
||||||
</td>
|
<br/>
|
||||||
</tr>
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="100%" align="right">
|
||||||
|
<a href="http://krysalis.org/"><img src="images/krysalis-compatible.png" alt="Krysalis Logo"/></a>
|
||||||
|
<a href="http://xml.apache.org/cocoon/"><img src="images/built-with-cocoon.png" alt="Cocoon Logo"/></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
@ -6,10 +6,6 @@
|
|||||||
copyright="@year@ Poi Project"
|
copyright="@year@ Poi Project"
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
|
||||||
<menu label="Main">
|
|
||||||
<menu-item label="Jakarta" href="http://jakarta.apache.org"/>
|
|
||||||
</menu>
|
|
||||||
|
|
||||||
<menu label="About">
|
<menu label="About">
|
||||||
<menu-item label="Index" href="index.html"/>
|
<menu-item label="Index" href="index.html"/>
|
||||||
<menu-item label="History" href="historyandfuture.html"/>
|
<menu-item label="History" href="historyandfuture.html"/>
|
||||||
@ -33,7 +29,6 @@
|
|||||||
<menu label="References">
|
<menu label="References">
|
||||||
<menu-item label="In The News" href="inthenews.html"/>
|
<menu-item label="In The News" href="inthenews.html"/>
|
||||||
<menu-item label="Live Sites" href="livesites.html"/>
|
<menu-item label="Live Sites" href="livesites.html"/>
|
||||||
<menu-item label="Building" href="building.xml"/>
|
|
||||||
<menu-item label="XLS spec [PDF]" href="http://sc.openoffice.org/excelfileformat.pdf"/>
|
<menu-item label="XLS spec [PDF]" href="http://sc.openoffice.org/excelfileformat.pdf"/>
|
||||||
<menu-item label="Apache Cocoon" href="http://xml.apache.org/cocoon/"/>
|
<menu-item label="Apache Cocoon" href="http://xml.apache.org/cocoon/"/>
|
||||||
<menu-item label="Resolutions" href="resolutions/index.html"/>
|
<menu-item label="Resolutions" href="resolutions/index.html"/>
|
||||||
|
31
src/java/log4j.properties
Normal file
31
src/java/log4j.properties
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#log4j.rootCategory=debug, globalLog
|
||||||
|
log4j.category.org.apache.poi.hssf=debug, hssfLog
|
||||||
|
log4j.category.org.apache.poi.hdf=debug, hdfLog
|
||||||
|
log4j.category.org.apache.poi.hpsf=debug, hpsfLog
|
||||||
|
log4j.category.org.apache.poi.poifs=debug, poifsLog
|
||||||
|
log4j.category.org.apache.poi.util=debug, utilLog
|
||||||
|
|
||||||
|
log4j.appender.hssfLog=org.apache.log4j.FileAppender
|
||||||
|
log4j.appender.hssfLog.File=hssf.log
|
||||||
|
log4j.appender.hssfLog.layout=org.apache.log4j.PatternLayout
|
||||||
|
log4j.appender.hssfLog.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
|
||||||
|
|
||||||
|
log4j.appender.hdfLog=org.apache.log4j.FileAppender
|
||||||
|
log4j.appender.hdfLog.File=hdf.log
|
||||||
|
log4j.appender.hdfLog.layout=org.apache.log4j.PatternLayout
|
||||||
|
log4j.appender.hdfLog.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
|
||||||
|
|
||||||
|
log4j.appender.hpsfLog=org.apache.log4j.FileAppender
|
||||||
|
log4j.appender.hpsfLog.File=hpsf.log
|
||||||
|
log4j.appender.hpsfLog.layout=org.apache.log4j.PatternLayout
|
||||||
|
log4j.appender.hpsfLog.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
|
||||||
|
|
||||||
|
log4j.appender.poifsLog=org.apache.log4j.FileAppender
|
||||||
|
log4j.appender.poifsLog.File=poifs.log
|
||||||
|
log4j.appender.poifsLog.layout=org.apache.log4j.PatternLayout
|
||||||
|
log4j.appender.poifsLog.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
|
||||||
|
|
||||||
|
log4j.appender.utilLog=org.apache.log4j.FileAppender
|
||||||
|
log4j.appender.utilLog.File=util.log
|
||||||
|
log4j.appender.utilLog.layout=org.apache.log4j.PatternLayout
|
||||||
|
log4j.appender.utilLog.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
|
@ -61,7 +61,7 @@ import java.util.List;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import org.apache.poi.hssf.HSSFLog;
|
import org.apache.poi.util.POILogFactory;
|
||||||
import org.apache.poi.hssf
|
import org.apache.poi.hssf
|
||||||
.record.*; // normally I don't do this, buy we literally mean ALL
|
.record.*; // normally I don't do this, buy we literally mean ALL
|
||||||
import org.apache.poi.hssf.record.formula.FormulaUtil;
|
import org.apache.poi.hssf.record.formula.FormulaUtil;
|
||||||
@ -106,7 +106,7 @@ public class Sheet
|
|||||||
protected MergeCellsRecord merged = null;
|
protected MergeCellsRecord merged = null;
|
||||||
protected int mergedloc = 0;
|
protected int mergedloc = 0;
|
||||||
private static POILogger log =
|
private static POILogger log =
|
||||||
HSSFLog.getPOILogger(Sheet.class);
|
POILogFactory.getLogger(Sheet.class);
|
||||||
private ArrayList columnSizes =
|
private ArrayList columnSizes =
|
||||||
null; // holds column info
|
null; // holds column info
|
||||||
protected ValueRecordsAggregate cells = null;
|
protected ValueRecordsAggregate cells = null;
|
||||||
|
@ -63,7 +63,7 @@ import java.util.Iterator;
|
|||||||
|
|
||||||
import org.apache.poi.hssf.record.*;
|
import org.apache.poi.hssf.record.*;
|
||||||
import org.apache.poi.util.POILogger;
|
import org.apache.poi.util.POILogger;
|
||||||
import org.apache.poi.hssf.HSSFLog;
|
import org.apache.poi.util.POILogFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Workbook
|
* Workbook
|
||||||
@ -130,7 +130,7 @@ public class Workbook
|
|||||||
private int backuppos =
|
private int backuppos =
|
||||||
0; // holds the position of the backup record.
|
0; // holds the position of the backup record.
|
||||||
private static POILogger log =
|
private static POILogger log =
|
||||||
HSSFLog.getPOILogger(Workbook.class);
|
POILogFactory.getLogger(Workbook.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new Workbook with no intitialization --useless right now
|
* Creates new Workbook with no intitialization --useless right now
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
V[1.1:net.sourceforge.poi.hssf]
|
|
||||||
S[net.sourceforge.poi.hssf:HSSFLog,net.sourceforge.poi.util:POILogFactory]{2:(140,107),(148,329)}
|
|
||||||
P[net.sourceforge.poi.hssf:HSSFLog]{20,20}
|
|
||||||
P[net.sourceforge.poi.hssf:HSSFLog]{279,20}
|
|
||||||
P[net.sourceforge.poi.util:POILogFactory]{11,329}
|
|
@ -60,7 +60,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.apache.poi.hssf.usermodel;
|
package org.apache.poi.hssf.usermodel;
|
||||||
|
|
||||||
import org.apache.poi.hssf.HSSFLog;
|
import org.apache.poi.util.POILogFactory;
|
||||||
import org.apache.poi.hssf.model.Sheet;
|
import org.apache.poi.hssf.model.Sheet;
|
||||||
import org.apache.poi.hssf.model.Workbook;
|
import org.apache.poi.hssf.model.Workbook;
|
||||||
import org.apache.poi.hssf.record.*;
|
import org.apache.poi.hssf.record.*;
|
||||||
@ -98,7 +98,7 @@ public class HSSFSheet
|
|||||||
private Workbook book;
|
private Workbook book;
|
||||||
private int firstrow;
|
private int firstrow;
|
||||||
private int lastrow;
|
private int lastrow;
|
||||||
private static POILogger log = HSSFLog.getPOILogger(HSSFSheet.class);
|
private static POILogger log = POILogFactory.getLogger(HSSFSheet.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new HSSFSheet - called by HSSFWorkbook to create a sheet from
|
* Creates new HSSFSheet - called by HSSFWorkbook to create a sheet from
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.apache.poi.hssf.usermodel;
|
package org.apache.poi.hssf.usermodel;
|
||||||
|
|
||||||
import org.apache.poi.hssf.HSSFLog;
|
import org.apache.poi.util.POILogFactory;
|
||||||
import org.apache.poi.hssf.model.Sheet;
|
import org.apache.poi.hssf.model.Sheet;
|
||||||
import org.apache.poi.hssf.model.Workbook;
|
import org.apache.poi.hssf.model.Workbook;
|
||||||
import org.apache.poi.hssf.record.*;
|
import org.apache.poi.hssf.record.*;
|
||||||
@ -110,7 +110,7 @@ public class HSSFWorkbook
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
private ArrayList sheets;
|
private ArrayList sheets;
|
||||||
private static POILogger log = HSSFLog.getPOILogger(HSSFWorkbook.class);
|
private static POILogger log = POILogFactory.getLogger(HSSFWorkbook.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new HSSFWorkbook from scratch (start here!)
|
* Creates new HSSFWorkbook from scratch (start here!)
|
||||||
|
@ -60,13 +60,7 @@ import java.io.IOException;
|
|||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import org.apache.log4j.ConsoleAppender;
|
import org.apache.commons.logging.*;
|
||||||
import org.apache.log4j.Hierarchy;
|
|
||||||
import org.apache.log4j.Level;
|
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
import org.apache.log4j.PropertyConfigurator;
|
|
||||||
import org.apache.log4j.SimpleLayout;
|
|
||||||
import org.apache.log4j.spi.RootCategory;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides logging without clients having to mess with
|
* Provides logging without clients having to mess with
|
||||||
@ -74,52 +68,23 @@ import org.apache.log4j.spi.RootCategory;
|
|||||||
*
|
*
|
||||||
* @author Andrew C. Oliver (acoliver at apache dot org)
|
* @author Andrew C. Oliver (acoliver at apache dot org)
|
||||||
* @author Marc Johnson (mjohnson at apache dot org)
|
* @author Marc Johnson (mjohnson at apache dot org)
|
||||||
|
* @author Nicola Ken Barozzi (nicolaken at apache.org)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class POILogFactory
|
public class POILogFactory
|
||||||
{
|
{
|
||||||
private Hierarchy _creator;
|
private static LogFactory _creator = LogFactory.getFactory();
|
||||||
|
|
||||||
// map of POILogger instances, with classes as keys
|
// map of POILogger instances, with classes as keys
|
||||||
private Map _loggers;
|
private static Map _loggers = new HashMap();;
|
||||||
private static final String _fs = System.getProperty("file.separator");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* construct a POILogFactory.
|
* construct a POILogFactory.
|
||||||
*
|
|
||||||
* @param logFile the name of the file that contains the
|
|
||||||
* properties governing the logs; should not be
|
|
||||||
* null or empty
|
|
||||||
* @param logPathProperty the name of the system property that
|
|
||||||
* defines the path of logFile; can not be
|
|
||||||
* null or empty
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public POILogFactory(final String logFile, final String logPathProperty)
|
private POILogFactory()
|
||||||
{
|
{
|
||||||
String logfile = logFile;
|
|
||||||
String logpath = System.getProperty(logPathProperty);
|
|
||||||
|
|
||||||
if ((logpath != null) && (logpath.trim().length() != 0))
|
|
||||||
{
|
|
||||||
logfile = logpath + _fs + logfile;
|
|
||||||
}
|
|
||||||
_creator =
|
|
||||||
new Hierarchy(new RootCategory(Logger.getRootLogger()
|
|
||||||
.getLevel()));
|
|
||||||
try
|
|
||||||
{
|
|
||||||
new FileInputStream(logfile).close();
|
|
||||||
new PropertyConfigurator().doConfigure(logfile, _creator);
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
_creator.getRootLogger()
|
|
||||||
.addAppender(new ConsoleAppender(new SimpleLayout(),
|
|
||||||
ConsoleAppender.SYSTEM_OUT));
|
|
||||||
_creator.getRootLogger().setLevel((Level)Level.INFO);
|
|
||||||
}
|
|
||||||
_loggers = new HashMap();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -130,16 +95,19 @@ public class POILogFactory
|
|||||||
* @return a POILogger for the specified class
|
* @return a POILogger for the specified class
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public POILogger getLogger(final Class theclass)
|
public static POILogger getLogger(final Class theclass)
|
||||||
{
|
{
|
||||||
POILogger logger = ( POILogger ) _loggers.get(theclass);
|
POILogger logger = null;
|
||||||
|
|
||||||
if (logger == null)
|
if (_loggers.containsKey(theclass))
|
||||||
{
|
{
|
||||||
logger = new POILogger(_creator.getLogger(theclass.getName()));
|
logger = ( POILogger ) _loggers.get(theclass);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
logger = new POILogger(_creator.getInstance(theclass));
|
||||||
_loggers.put(theclass, logger);
|
_loggers.put(theclass, logger);
|
||||||
}
|
}
|
||||||
return logger;
|
return logger;
|
||||||
}
|
}
|
||||||
} // end public class POILogFactory
|
} // end public class POILogFactory
|
||||||
|
|
||||||
|
@ -55,8 +55,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.apache.poi.util;
|
package org.apache.poi.util;
|
||||||
|
|
||||||
import org.apache.log4j.Level;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@ -68,16 +67,17 @@ import java.util.*;
|
|||||||
*
|
*
|
||||||
* @author Marc Johnson (mjohnson at apache dot org)
|
* @author Marc Johnson (mjohnson at apache dot org)
|
||||||
* @author Glen Stampoultzis (glens at apache.org)
|
* @author Glen Stampoultzis (glens at apache.org)
|
||||||
|
* @author Nicola Ken Barozzi (nicolaken at apache.org)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class POILogger
|
public class POILogger
|
||||||
{
|
{
|
||||||
private Logger log = null;
|
private Log log = null;
|
||||||
public static final int DEBUG = Level.DEBUG_INT;
|
public static final int DEBUG = 1;
|
||||||
public static final int INFO = Level.INFO_INT;
|
public static final int INFO = 3;
|
||||||
public static final int WARN = Level.WARN_INT;
|
public static final int WARN = 5;
|
||||||
public static final int ERROR = Level.ERROR_INT;
|
public static final int ERROR = 7;
|
||||||
public static final int FATAL = Level.FATAL_INT;
|
public static final int FATAL = 9;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* package scope so it cannot be instantiated outside of the util
|
* package scope so it cannot be instantiated outside of the util
|
||||||
@ -86,7 +86,7 @@ public class POILogger
|
|||||||
* @param log the object that does the real work of logging
|
* @param log the object that does the real work of logging
|
||||||
*/
|
*/
|
||||||
|
|
||||||
POILogger(final Logger log)
|
POILogger(final Log log)
|
||||||
{
|
{
|
||||||
this.log = log;
|
this.log = log;
|
||||||
}
|
}
|
||||||
@ -94,50 +94,139 @@ public class POILogger
|
|||||||
/**
|
/**
|
||||||
* Log a message
|
* Log a message
|
||||||
*
|
*
|
||||||
* @param logLevel One of DEBUG, INFO, WARN, ERROR, FATAL
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
* @param obj1 The object to log. This is converted to a string.
|
* @param obj1 The object to log.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void log(final int logLevel, final Object obj1)
|
public void log(final int level, final Object obj1)
|
||||||
{
|
{
|
||||||
log.log(Level.toLevel(logLevel), obj1);
|
if(level==FATAL)
|
||||||
|
{
|
||||||
|
if(log.isFatalEnabled())
|
||||||
|
{
|
||||||
|
log.fatal(obj1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(level==ERROR)
|
||||||
|
{
|
||||||
|
if(log.isErrorEnabled())
|
||||||
|
{
|
||||||
|
log.error(obj1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(level==WARN)
|
||||||
|
{
|
||||||
|
if(log.isWarnEnabled())
|
||||||
|
{
|
||||||
|
log.warn(obj1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(level==INFO)
|
||||||
|
{
|
||||||
|
if(log.isInfoEnabled())
|
||||||
|
{
|
||||||
|
log.info(obj1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(level==DEBUG)
|
||||||
|
{
|
||||||
|
if(log.isDebugEnabled())
|
||||||
|
{
|
||||||
|
log.debug(obj1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(log.isTraceEnabled())
|
||||||
|
{
|
||||||
|
log.trace(obj1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a logger is enabled to log at the specified level
|
||||||
|
*
|
||||||
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
|
* @param obj1 The logger to check.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public boolean check(final Log log, final int level)
|
||||||
|
{
|
||||||
|
if(level==FATAL)
|
||||||
|
{
|
||||||
|
if(log.isFatalEnabled())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(level==ERROR)
|
||||||
|
{
|
||||||
|
if(log.isErrorEnabled())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(level==WARN)
|
||||||
|
{
|
||||||
|
if(log.isWarnEnabled())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(level==INFO)
|
||||||
|
{
|
||||||
|
if(log.isInfoEnabled())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(level==DEBUG)
|
||||||
|
{
|
||||||
|
if(log.isDebugEnabled())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log a message. Lazily appends Object parameters together.
|
* Log a message. Lazily appends Object parameters together.
|
||||||
*
|
*
|
||||||
* @param logLevel One of DEBUG, INFO, WARN, ERROR, FATAL
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
* @param obj1 first object to place in the message
|
* @param obj1 first object to place in the message
|
||||||
* @param obj2 second object to place in the message
|
* @param obj2 second object to place in the message
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void log(final int logLevel, final Object obj1, final Object obj2)
|
public void log(final int level, final Object obj1, final Object obj2)
|
||||||
{
|
{
|
||||||
Level level = Level.toLevel(logLevel);
|
if (check(log, level))
|
||||||
|
|
||||||
if (log.isEnabledFor(level))
|
|
||||||
{
|
{
|
||||||
log.log(level, new StringBuffer(32).append(obj1).append(obj2));
|
log(level, new StringBuffer(32).append(obj1).append(obj2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log a message. Lazily appends Object parameters together.
|
* Log a message. Lazily appends Object parameters together.
|
||||||
*
|
*
|
||||||
* @param logLevel One of DEBUG, INFO, WARN, ERROR, FATAL
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
* @param obj1 first Object to place in the message
|
* @param obj1 first Object to place in the message
|
||||||
* @param obj2 second Object to place in the message
|
* @param obj2 second Object to place in the message
|
||||||
* @param obj3 third Object to place in the message
|
* @param obj3 third Object to place in the message
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void log(final int logLevel, final Object obj1, final Object obj2,
|
public void log(final int level, final Object obj1, final Object obj2,
|
||||||
final Object obj3)
|
final Object obj3)
|
||||||
{
|
{
|
||||||
Level level = Level.toLevel(logLevel);
|
|
||||||
|
|
||||||
if (log.isEnabledFor(level))
|
|
||||||
|
if (check(log, level))
|
||||||
{
|
{
|
||||||
log.log(level,
|
log(level,
|
||||||
new StringBuffer(48).append(obj1).append(obj2)
|
new StringBuffer(48).append(obj1).append(obj2)
|
||||||
.append(obj3));
|
.append(obj3));
|
||||||
}
|
}
|
||||||
@ -146,21 +235,21 @@ public class POILogger
|
|||||||
/**
|
/**
|
||||||
* Log a message. Lazily appends Object parameters together.
|
* Log a message. Lazily appends Object parameters together.
|
||||||
*
|
*
|
||||||
* @param logLevel One of DEBUG, INFO, WARN, ERROR, FATAL
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
* @param obj1 first Object to place in the message
|
* @param obj1 first Object to place in the message
|
||||||
* @param obj2 second Object to place in the message
|
* @param obj2 second Object to place in the message
|
||||||
* @param obj3 third Object to place in the message
|
* @param obj3 third Object to place in the message
|
||||||
* @param obj4 fourth Object to place in the message
|
* @param obj4 fourth Object to place in the message
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void log(final int logLevel, final Object obj1, final Object obj2,
|
public void log(final int level, final Object obj1, final Object obj2,
|
||||||
final Object obj3, final Object obj4)
|
final Object obj3, final Object obj4)
|
||||||
{
|
{
|
||||||
Level level = Level.toLevel(logLevel);
|
|
||||||
|
|
||||||
if (log.isEnabledFor(level))
|
|
||||||
|
if (check(log, level))
|
||||||
{
|
{
|
||||||
log.log(level,
|
log(level,
|
||||||
new StringBuffer(64).append(obj1).append(obj2)
|
new StringBuffer(64).append(obj1).append(obj2)
|
||||||
.append(obj3).append(obj4));
|
.append(obj3).append(obj4));
|
||||||
}
|
}
|
||||||
@ -169,7 +258,7 @@ public class POILogger
|
|||||||
/**
|
/**
|
||||||
* Log a message. Lazily appends Object parameters together.
|
* Log a message. Lazily appends Object parameters together.
|
||||||
*
|
*
|
||||||
* @param logLevel One of DEBUG, INFO, WARN, ERROR, FATAL
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
* @param obj1 first Object to place in the message
|
* @param obj1 first Object to place in the message
|
||||||
* @param obj2 second Object to place in the message
|
* @param obj2 second Object to place in the message
|
||||||
* @param obj3 third Object to place in the message
|
* @param obj3 third Object to place in the message
|
||||||
@ -177,14 +266,14 @@ public class POILogger
|
|||||||
* @param obj5 fifth Object to place in the message
|
* @param obj5 fifth Object to place in the message
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void log(final int logLevel, final Object obj1, final Object obj2,
|
public void log(final int level, final Object obj1, final Object obj2,
|
||||||
final Object obj3, final Object obj4, final Object obj5)
|
final Object obj3, final Object obj4, final Object obj5)
|
||||||
{
|
{
|
||||||
Level level = Level.toLevel(logLevel);
|
|
||||||
|
|
||||||
if (log.isEnabledFor(level))
|
|
||||||
|
if (check(log, level))
|
||||||
{
|
{
|
||||||
log.log(level,
|
log(level,
|
||||||
new StringBuffer(80).append(obj1).append(obj2)
|
new StringBuffer(80).append(obj1).append(obj2)
|
||||||
.append(obj3).append(obj4).append(obj5));
|
.append(obj3).append(obj4).append(obj5));
|
||||||
}
|
}
|
||||||
@ -193,7 +282,7 @@ public class POILogger
|
|||||||
/**
|
/**
|
||||||
* Log a message. Lazily appends Object parameters together.
|
* Log a message. Lazily appends Object parameters together.
|
||||||
*
|
*
|
||||||
* @param logLevel One of DEBUG, INFO, WARN, ERROR, FATAL
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
* @param obj1 first Object to place in the message
|
* @param obj1 first Object to place in the message
|
||||||
* @param obj2 second Object to place in the message
|
* @param obj2 second Object to place in the message
|
||||||
* @param obj3 third Object to place in the message
|
* @param obj3 third Object to place in the message
|
||||||
@ -202,15 +291,15 @@ public class POILogger
|
|||||||
* @param obj6 sixth Object to place in the message
|
* @param obj6 sixth Object to place in the message
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void log(final int logLevel, final Object obj1, final Object obj2,
|
public void log(final int level, final Object obj1, final Object obj2,
|
||||||
final Object obj3, final Object obj4, final Object obj5,
|
final Object obj3, final Object obj4, final Object obj5,
|
||||||
final Object obj6)
|
final Object obj6)
|
||||||
{
|
{
|
||||||
Level level = Level.toLevel(logLevel);
|
|
||||||
|
|
||||||
if (log.isEnabledFor(level))
|
|
||||||
|
if (check(log, level))
|
||||||
{
|
{
|
||||||
log.log(Level.toLevel(logLevel),
|
log(level ,
|
||||||
new StringBuffer(96).append(obj1).append(obj2)
|
new StringBuffer(96).append(obj1).append(obj2)
|
||||||
.append(obj3).append(obj4).append(obj5).append(obj6));
|
.append(obj3).append(obj4).append(obj5).append(obj6));
|
||||||
}
|
}
|
||||||
@ -219,7 +308,7 @@ public class POILogger
|
|||||||
/**
|
/**
|
||||||
* Log a message. Lazily appends Object parameters together.
|
* Log a message. Lazily appends Object parameters together.
|
||||||
*
|
*
|
||||||
* @param logLevel One of DEBUG, INFO, WARN, ERROR, FATAL
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
* @param obj1 first Object to place in the message
|
* @param obj1 first Object to place in the message
|
||||||
* @param obj2 second Object to place in the message
|
* @param obj2 second Object to place in the message
|
||||||
* @param obj3 third Object to place in the message
|
* @param obj3 third Object to place in the message
|
||||||
@ -229,15 +318,15 @@ public class POILogger
|
|||||||
* @param obj7 seventh Object to place in the message
|
* @param obj7 seventh Object to place in the message
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void log(final int logLevel, final Object obj1, final Object obj2,
|
public void log(final int level, final Object obj1, final Object obj2,
|
||||||
final Object obj3, final Object obj4, final Object obj5,
|
final Object obj3, final Object obj4, final Object obj5,
|
||||||
final Object obj6, final Object obj7)
|
final Object obj6, final Object obj7)
|
||||||
{
|
{
|
||||||
Level level = Level.toLevel(logLevel);
|
|
||||||
|
|
||||||
if (log.isEnabledFor(level))
|
|
||||||
|
if (check(log, level))
|
||||||
{
|
{
|
||||||
log.log(level,
|
log(level,
|
||||||
new StringBuffer(112).append(obj1).append(obj2)
|
new StringBuffer(112).append(obj1).append(obj2)
|
||||||
.append(obj3).append(obj4).append(obj5).append(obj6)
|
.append(obj3).append(obj4).append(obj5).append(obj6)
|
||||||
.append(obj7));
|
.append(obj7));
|
||||||
@ -247,7 +336,7 @@ public class POILogger
|
|||||||
/**
|
/**
|
||||||
* Log a message. Lazily appends Object parameters together.
|
* Log a message. Lazily appends Object parameters together.
|
||||||
*
|
*
|
||||||
* @param logLevel One of DEBUG, INFO, WARN, ERROR, FATAL
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
* @param obj1 first Object to place in the message
|
* @param obj1 first Object to place in the message
|
||||||
* @param obj2 second Object to place in the message
|
* @param obj2 second Object to place in the message
|
||||||
* @param obj3 third Object to place in the message
|
* @param obj3 third Object to place in the message
|
||||||
@ -258,15 +347,15 @@ public class POILogger
|
|||||||
* @param obj8 eighth Object to place in the message
|
* @param obj8 eighth Object to place in the message
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void log(final int logLevel, final Object obj1, final Object obj2,
|
public void log(final int level, final Object obj1, final Object obj2,
|
||||||
final Object obj3, final Object obj4, final Object obj5,
|
final Object obj3, final Object obj4, final Object obj5,
|
||||||
final Object obj6, final Object obj7, final Object obj8)
|
final Object obj6, final Object obj7, final Object obj8)
|
||||||
{
|
{
|
||||||
Level level = Level.toLevel(logLevel);
|
|
||||||
|
|
||||||
if (log.isEnabledFor(level))
|
|
||||||
|
if (check(log, level))
|
||||||
{
|
{
|
||||||
log.log(level,
|
log(level,
|
||||||
new StringBuffer(128).append(obj1).append(obj2)
|
new StringBuffer(128).append(obj1).append(obj2)
|
||||||
.append(obj3).append(obj4).append(obj5).append(obj6)
|
.append(obj3).append(obj4).append(obj5).append(obj6)
|
||||||
.append(obj7).append(obj8));
|
.append(obj7).append(obj8));
|
||||||
@ -276,34 +365,34 @@ public class POILogger
|
|||||||
/**
|
/**
|
||||||
* Log a message
|
* Log a message
|
||||||
*
|
*
|
||||||
* @param logLevel One of DEBUG, INFO, WARN, ERROR, FATAL
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
* @param obj1 The object to log. This is converted to a string.
|
* @param obj1 The object to log. This is converted to a string.
|
||||||
* @param exception An exception to be logged
|
* @param exception An exception to be logged
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void log(final int logLevel, final Object obj1,
|
public void log(final int level, final Object obj1,
|
||||||
final Throwable exception)
|
final Throwable exception)
|
||||||
{
|
{
|
||||||
log.log(Level.toLevel(logLevel), obj1, exception);
|
log(level , obj1, exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log a message. Lazily appends Object parameters together.
|
* Log a message. Lazily appends Object parameters together.
|
||||||
*
|
*
|
||||||
* @param logLevel One of DEBUG, INFO, WARN, ERROR, FATAL
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
* @param obj1 first Object to place in the message
|
* @param obj1 first Object to place in the message
|
||||||
* @param obj2 second Object to place in the message
|
* @param obj2 second Object to place in the message
|
||||||
* @param exception An exception to be logged
|
* @param exception An exception to be logged
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void log(final int logLevel, final Object obj1, final Object obj2,
|
public void log(final int level, final Object obj1, final Object obj2,
|
||||||
final Throwable exception)
|
final Throwable exception)
|
||||||
{
|
{
|
||||||
Level level = Level.toLevel(logLevel);
|
|
||||||
|
|
||||||
if (log.isEnabledFor(level))
|
|
||||||
|
if (check(log, level))
|
||||||
{
|
{
|
||||||
log.log(level, new StringBuffer(32).append(obj1).append(obj2),
|
log(level, new StringBuffer(32).append(obj1).append(obj2),
|
||||||
exception);
|
exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -311,21 +400,21 @@ public class POILogger
|
|||||||
/**
|
/**
|
||||||
* Log a message. Lazily appends Object parameters together.
|
* Log a message. Lazily appends Object parameters together.
|
||||||
*
|
*
|
||||||
* @param logLevel One of DEBUG, INFO, WARN, ERROR, FATAL
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
* @param obj1 first Object to place in the message
|
* @param obj1 first Object to place in the message
|
||||||
* @param obj2 second Object to place in the message
|
* @param obj2 second Object to place in the message
|
||||||
* @param obj3 third object to place in the message
|
* @param obj3 third object to place in the message
|
||||||
* @param exception An error message to be logged
|
* @param exception An error message to be logged
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void log(final int logLevel, final Object obj1, final Object obj2,
|
public void log(final int level, final Object obj1, final Object obj2,
|
||||||
final Object obj3, final Throwable exception)
|
final Object obj3, final Throwable exception)
|
||||||
{
|
{
|
||||||
Level level = Level.toLevel(logLevel);
|
|
||||||
|
|
||||||
if (log.isEnabledFor(level))
|
|
||||||
|
if (check(log, level))
|
||||||
{
|
{
|
||||||
log.log(level, new StringBuffer(48).append(obj1).append(obj2)
|
log(level, new StringBuffer(48).append(obj1).append(obj2)
|
||||||
.append(obj3), exception);
|
.append(obj3), exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -333,7 +422,7 @@ public class POILogger
|
|||||||
/**
|
/**
|
||||||
* Log a message. Lazily appends Object parameters together.
|
* Log a message. Lazily appends Object parameters together.
|
||||||
*
|
*
|
||||||
* @param logLevel One of DEBUG, INFO, WARN, ERROR, FATAL
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
* @param obj1 first Object to place in the message
|
* @param obj1 first Object to place in the message
|
||||||
* @param obj2 second Object to place in the message
|
* @param obj2 second Object to place in the message
|
||||||
* @param obj3 third object to place in the message
|
* @param obj3 third object to place in the message
|
||||||
@ -341,15 +430,15 @@ public class POILogger
|
|||||||
* @param exception An exception to be logged
|
* @param exception An exception to be logged
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void log(final int logLevel, final Object obj1, final Object obj2,
|
public void log(final int level, final Object obj1, final Object obj2,
|
||||||
final Object obj3, final Object obj4,
|
final Object obj3, final Object obj4,
|
||||||
final Throwable exception)
|
final Throwable exception)
|
||||||
{
|
{
|
||||||
Level level = Level.toLevel(logLevel);
|
|
||||||
|
|
||||||
if (log.isEnabledFor(level))
|
|
||||||
|
if (check(log, level))
|
||||||
{
|
{
|
||||||
log.log(level, new StringBuffer(64).append(obj1).append(obj2)
|
log(level, new StringBuffer(64).append(obj1).append(obj2)
|
||||||
.append(obj3).append(obj4), exception);
|
.append(obj3).append(obj4), exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -357,7 +446,7 @@ public class POILogger
|
|||||||
/**
|
/**
|
||||||
* Log a message. Lazily appends Object parameters together.
|
* Log a message. Lazily appends Object parameters together.
|
||||||
*
|
*
|
||||||
* @param logLevel One of DEBUG, INFO, WARN, ERROR, FATAL
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
* @param obj1 first Object to place in the message
|
* @param obj1 first Object to place in the message
|
||||||
* @param obj2 second Object to place in the message
|
* @param obj2 second Object to place in the message
|
||||||
* @param obj3 third object to place in the message
|
* @param obj3 third object to place in the message
|
||||||
@ -366,15 +455,15 @@ public class POILogger
|
|||||||
* @param exception An exception to be logged
|
* @param exception An exception to be logged
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void log(final int logLevel, final Object obj1, final Object obj2,
|
public void log(final int level, final Object obj1, final Object obj2,
|
||||||
final Object obj3, final Object obj4, final Object obj5,
|
final Object obj3, final Object obj4, final Object obj5,
|
||||||
final Throwable exception)
|
final Throwable exception)
|
||||||
{
|
{
|
||||||
Level level = Level.toLevel(logLevel);
|
|
||||||
|
|
||||||
if (log.isEnabledFor(level))
|
|
||||||
|
if (check(log, level))
|
||||||
{
|
{
|
||||||
log.log(level, new StringBuffer(80).append(obj1).append(obj2)
|
log(level, new StringBuffer(80).append(obj1).append(obj2)
|
||||||
.append(obj3).append(obj4).append(obj5), exception);
|
.append(obj3).append(obj4).append(obj5), exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -382,7 +471,7 @@ public class POILogger
|
|||||||
/**
|
/**
|
||||||
* Log a message. Lazily appends Object parameters together.
|
* Log a message. Lazily appends Object parameters together.
|
||||||
*
|
*
|
||||||
* @param logLevel One of DEBUG, INFO, WARN, ERROR, FATAL
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
* @param obj1 first Object to place in the message
|
* @param obj1 first Object to place in the message
|
||||||
* @param obj2 second Object to place in the message
|
* @param obj2 second Object to place in the message
|
||||||
* @param obj3 third object to place in the message
|
* @param obj3 third object to place in the message
|
||||||
@ -392,15 +481,15 @@ public class POILogger
|
|||||||
* @param exception An exception to be logged
|
* @param exception An exception to be logged
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void log(final int logLevel, final Object obj1, final Object obj2,
|
public void log(final int level, final Object obj1, final Object obj2,
|
||||||
final Object obj3, final Object obj4, final Object obj5,
|
final Object obj3, final Object obj4, final Object obj5,
|
||||||
final Object obj6, final Throwable exception)
|
final Object obj6, final Throwable exception)
|
||||||
{
|
{
|
||||||
Level level = Level.toLevel(logLevel);
|
|
||||||
|
|
||||||
if (log.isEnabledFor(level))
|
|
||||||
|
if (check(log, level))
|
||||||
{
|
{
|
||||||
log.log(Level.toLevel(logLevel), new StringBuffer(96).append(obj1)
|
log(level , new StringBuffer(96).append(obj1)
|
||||||
.append(obj2).append(obj3).append(obj4).append(obj5)
|
.append(obj2).append(obj3).append(obj4).append(obj5)
|
||||||
.append(obj6), exception);
|
.append(obj6), exception);
|
||||||
}
|
}
|
||||||
@ -409,7 +498,7 @@ public class POILogger
|
|||||||
/**
|
/**
|
||||||
* Log a message. Lazily appends Object parameters together.
|
* Log a message. Lazily appends Object parameters together.
|
||||||
*
|
*
|
||||||
* @param logLevel One of DEBUG, INFO, WARN, ERROR, FATAL
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
* @param obj1 first Object to place in the message
|
* @param obj1 first Object to place in the message
|
||||||
* @param obj2 second Object to place in the message
|
* @param obj2 second Object to place in the message
|
||||||
* @param obj3 third object to place in the message
|
* @param obj3 third object to place in the message
|
||||||
@ -420,16 +509,16 @@ public class POILogger
|
|||||||
* @param exception An exception to be logged
|
* @param exception An exception to be logged
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void log(final int logLevel, final Object obj1, final Object obj2,
|
public void log(final int level, final Object obj1, final Object obj2,
|
||||||
final Object obj3, final Object obj4, final Object obj5,
|
final Object obj3, final Object obj4, final Object obj5,
|
||||||
final Object obj6, final Object obj7,
|
final Object obj6, final Object obj7,
|
||||||
final Throwable exception)
|
final Throwable exception)
|
||||||
{
|
{
|
||||||
Level level = Level.toLevel(logLevel);
|
|
||||||
|
|
||||||
if (log.isEnabledFor(level))
|
|
||||||
|
if (check(log, level))
|
||||||
{
|
{
|
||||||
log.log(level, new StringBuffer(112).append(obj1).append(obj2)
|
log(level, new StringBuffer(112).append(obj1).append(obj2)
|
||||||
.append(obj3).append(obj4).append(obj5).append(obj6)
|
.append(obj3).append(obj4).append(obj5).append(obj6)
|
||||||
.append(obj7), exception);
|
.append(obj7), exception);
|
||||||
}
|
}
|
||||||
@ -438,7 +527,7 @@ public class POILogger
|
|||||||
/**
|
/**
|
||||||
* Log a message. Lazily appends Object parameters together.
|
* Log a message. Lazily appends Object parameters together.
|
||||||
*
|
*
|
||||||
* @param logLevel One of DEBUG, INFO, WARN, ERROR, FATAL
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
* @param obj1 first Object to place in the message
|
* @param obj1 first Object to place in the message
|
||||||
* @param obj2 second Object to place in the message
|
* @param obj2 second Object to place in the message
|
||||||
* @param obj3 third object to place in the message
|
* @param obj3 third object to place in the message
|
||||||
@ -450,16 +539,16 @@ public class POILogger
|
|||||||
* @param exception An exception to be logged
|
* @param exception An exception to be logged
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void log(final int logLevel, final Object obj1, final Object obj2,
|
public void log(final int level, final Object obj1, final Object obj2,
|
||||||
final Object obj3, final Object obj4, final Object obj5,
|
final Object obj3, final Object obj4, final Object obj5,
|
||||||
final Object obj6, final Object obj7, final Object obj8,
|
final Object obj6, final Object obj7, final Object obj8,
|
||||||
final Throwable exception)
|
final Throwable exception)
|
||||||
{
|
{
|
||||||
Level level = Level.toLevel(logLevel);
|
|
||||||
|
|
||||||
if (log.isEnabledFor(level))
|
|
||||||
|
if (check(log, level))
|
||||||
{
|
{
|
||||||
log.log(level, new StringBuffer(128).append(obj1).append(obj2)
|
log(level, new StringBuffer(128).append(obj1).append(obj2)
|
||||||
.append(obj3).append(obj4).append(obj5).append(obj6)
|
.append(obj3).append(obj4).append(obj5).append(obj6)
|
||||||
.append(obj7).append(obj8), exception);
|
.append(obj7).append(obj8), exception);
|
||||||
}
|
}
|
||||||
@ -485,15 +574,15 @@ public class POILogger
|
|||||||
* If the last parameter (after flattening) is a Throwable it is
|
* If the last parameter (after flattening) is a Throwable it is
|
||||||
* logged specially.
|
* logged specially.
|
||||||
*
|
*
|
||||||
* @param logLevel One of DEBUG, INFO, WARN, ERROR, FATAL
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
* @param message The message to log.
|
* @param message The message to log.
|
||||||
* @param obj1 The first object to match against.
|
* @param obj1 The first object to match against.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void logFormatted(final int logLevel, final String message,
|
public void logFormatted(final int level, final String message,
|
||||||
final Object obj1)
|
final Object obj1)
|
||||||
{
|
{
|
||||||
commonLogFormatted(logLevel, message, new Object[]
|
commonLogFormatted(level, message, new Object[]
|
||||||
{
|
{
|
||||||
obj1
|
obj1
|
||||||
});
|
});
|
||||||
@ -519,16 +608,16 @@ public class POILogger
|
|||||||
* If the last parameter (after flattening) is a Throwable it is
|
* If the last parameter (after flattening) is a Throwable it is
|
||||||
* logged specially.
|
* logged specially.
|
||||||
*
|
*
|
||||||
* @param logLevel One of DEBUG, INFO, WARN, ERROR, FATAL
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
* @param message The message to log.
|
* @param message The message to log.
|
||||||
* @param obj1 The first object to match against.
|
* @param obj1 The first object to match against.
|
||||||
* @param obj2 The second object to match against.
|
* @param obj2 The second object to match against.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void logFormatted(final int logLevel, final String message,
|
public void logFormatted(final int level, final String message,
|
||||||
final Object obj1, final Object obj2)
|
final Object obj1, final Object obj2)
|
||||||
{
|
{
|
||||||
commonLogFormatted(logLevel, message, new Object[]
|
commonLogFormatted(level, message, new Object[]
|
||||||
{
|
{
|
||||||
obj1, obj2
|
obj1, obj2
|
||||||
});
|
});
|
||||||
@ -554,18 +643,18 @@ public class POILogger
|
|||||||
* If the last parameter (after flattening) is a Throwable it is
|
* If the last parameter (after flattening) is a Throwable it is
|
||||||
* logged specially.
|
* logged specially.
|
||||||
*
|
*
|
||||||
* @param logLevel One of DEBUG, INFO, WARN, ERROR, FATAL
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
* @param message The message to log.
|
* @param message The message to log.
|
||||||
* @param obj1 The first object to match against.
|
* @param obj1 The first object to match against.
|
||||||
* @param obj2 The second object to match against.
|
* @param obj2 The second object to match against.
|
||||||
* @param obj3 The third object to match against.
|
* @param obj3 The third object to match against.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void logFormatted(final int logLevel, final String message,
|
public void logFormatted(final int level, final String message,
|
||||||
final Object obj1, final Object obj2,
|
final Object obj1, final Object obj2,
|
||||||
final Object obj3)
|
final Object obj3)
|
||||||
{
|
{
|
||||||
commonLogFormatted(logLevel, message, new Object[]
|
commonLogFormatted(level, message, new Object[]
|
||||||
{
|
{
|
||||||
obj1, obj2, obj3
|
obj1, obj2, obj3
|
||||||
});
|
});
|
||||||
@ -591,7 +680,7 @@ public class POILogger
|
|||||||
* If the last parameter (after flattening) is a Throwable it is
|
* If the last parameter (after flattening) is a Throwable it is
|
||||||
* logged specially.
|
* logged specially.
|
||||||
*
|
*
|
||||||
* @param logLevel One of DEBUG, INFO, WARN, ERROR, FATAL
|
* @param level One of DEBUG, INFO, WARN, ERROR, FATAL
|
||||||
* @param message The message to log.
|
* @param message The message to log.
|
||||||
* @param obj1 The first object to match against.
|
* @param obj1 The first object to match against.
|
||||||
* @param obj2 The second object to match against.
|
* @param obj2 The second object to match against.
|
||||||
@ -599,33 +688,33 @@ public class POILogger
|
|||||||
* @param obj4 The forth object to match against.
|
* @param obj4 The forth object to match against.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void logFormatted(final int logLevel, final String message,
|
public void logFormatted(final int level, final String message,
|
||||||
final Object obj1, final Object obj2,
|
final Object obj1, final Object obj2,
|
||||||
final Object obj3, final Object obj4)
|
final Object obj3, final Object obj4)
|
||||||
{
|
{
|
||||||
commonLogFormatted(logLevel, message, new Object[]
|
commonLogFormatted(level, message, new Object[]
|
||||||
{
|
{
|
||||||
obj1, obj2, obj3, obj4
|
obj1, obj2, obj3, obj4
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void commonLogFormatted(final int logLevel, final String message,
|
private void commonLogFormatted(final int level, final String message,
|
||||||
final Object [] unflatParams)
|
final Object [] unflatParams)
|
||||||
{
|
{
|
||||||
Level level = Level.toLevel(logLevel);
|
|
||||||
|
|
||||||
if (log.isEnabledFor(level))
|
|
||||||
|
if (check(log, level))
|
||||||
{
|
{
|
||||||
Object[] params = flattenArrays(unflatParams);
|
Object[] params = flattenArrays(unflatParams);
|
||||||
|
|
||||||
if (params[ params.length - 1 ] instanceof Throwable)
|
if (params[ params.length - 1 ] instanceof Throwable)
|
||||||
{
|
{
|
||||||
log(logLevel, StringUtil.format(message, params),
|
log(level, StringUtil.format(message, params),
|
||||||
( Throwable ) params[ params.length - 1 ]);
|
( Throwable ) params[ params.length - 1 ]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
log(logLevel, StringUtil.format(message, params));
|
log(level, StringUtil.format(message, params));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
0
tools/resources/jindent/poi.jin → src/resources/devtools/poi.jin
Executable file → Normal file
0
tools/resources/jindent/poi.jin → src/resources/devtools/poi.jin
Executable file → Normal file
@ -1,141 +0,0 @@
|
|||||||
|
|
||||||
/* ====================================================================
|
|
||||||
* The Apache Software License, Version 1.1
|
|
||||||
*
|
|
||||||
* Copyright (c) 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 acknowledgment:
|
|
||||||
* "This product includes software developed by the
|
|
||||||
* Apache Software Foundation (http://www.apache.org/)."
|
|
||||||
* Alternately, this acknowledgment may appear in the software itself,
|
|
||||||
* if and wherever such third-party acknowledgments normally appear.
|
|
||||||
*
|
|
||||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
|
||||||
* "Apache POI" must not be used to endorse or promote products
|
|
||||||
* derived from this software without prior written permission. For
|
|
||||||
* written permission, please contact apache@apache.org.
|
|
||||||
*
|
|
||||||
* 5. Products derived from this software may not be called "Apache",
|
|
||||||
* "Apache POI", nor may "Apache" appear in their name, without
|
|
||||||
* prior written permission of the Apache Software Foundation.
|
|
||||||
*
|
|
||||||
* 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/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.apache.poi.util;
|
|
||||||
|
|
||||||
import org.apache.log4j.Category;
|
|
||||||
|
|
||||||
import junit.framework.*;
|
|
||||||
|
|
||||||
import java.io.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Marc Johnson (mjohnson at apache dot org)
|
|
||||||
* @author Glen Stampoultzis (glens at apache.org)
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class TestPOILogFactory
|
|
||||||
extends TestCase
|
|
||||||
{
|
|
||||||
private String _test_file_path;
|
|
||||||
private static final String _test_file_path_property =
|
|
||||||
"UTIL.testdata.path";
|
|
||||||
private static final String _fs =
|
|
||||||
System.getProperty("file.separator");
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates new TestPOILogFactory
|
|
||||||
*
|
|
||||||
* @param name
|
|
||||||
*/
|
|
||||||
|
|
||||||
public TestPOILogFactory(String name)
|
|
||||||
{
|
|
||||||
super(name);
|
|
||||||
_test_file_path = System.getProperty(_test_file_path_property) + _fs;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* test log creation
|
|
||||||
*
|
|
||||||
* @exception IOException
|
|
||||||
*/
|
|
||||||
|
|
||||||
public void testLog()
|
|
||||||
throws IOException
|
|
||||||
{
|
|
||||||
|
|
||||||
// empty log files
|
|
||||||
// check the path exists first
|
|
||||||
assertTrue("Checking for existance of test property directory was "
|
|
||||||
+ _test_file_path, new File(_test_file_path).exists());
|
|
||||||
new File("p1.log").delete();
|
|
||||||
new File("p2.log").delete();
|
|
||||||
POILogFactory f1 = new POILogFactory(_test_file_path
|
|
||||||
+ "test_properties1", "foo");
|
|
||||||
POILogFactory f2 = new POILogFactory(_test_file_path
|
|
||||||
+ "test_properties2", "bar");
|
|
||||||
POILogger l1 = f1.getLogger(f1.getClass());
|
|
||||||
POILogger l2 = f2.getLogger(f2.getClass());
|
|
||||||
|
|
||||||
l1.log(POILogger.WARN, "test1");
|
|
||||||
l2.log(POILogger.WARN, "test2");
|
|
||||||
|
|
||||||
// It appears necessary that sleep is required for files to be
|
|
||||||
// written on Win2000. Tried manually closing appenders with
|
|
||||||
// no luck.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Thread.sleep(4000);
|
|
||||||
}
|
|
||||||
catch (InterruptedException letBuffersFlush)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
assertTrue(new File("p1.log").length() != 0);
|
|
||||||
assertTrue(new File("p2.log").length() != 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* main method to run the unit tests
|
|
||||||
*
|
|
||||||
* @param ignored_args
|
|
||||||
*/
|
|
||||||
|
|
||||||
public static void main(String [] ignored_args)
|
|
||||||
{
|
|
||||||
System.out.println("Testing util.POILogFactory functionality");
|
|
||||||
junit.textui.TestRunner.run(TestPOILogFactory.class);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,181 +0,0 @@
|
|||||||
|
|
||||||
/* ====================================================================
|
|
||||||
* The Apache Software License, Version 1.1
|
|
||||||
*
|
|
||||||
* Copyright (c) 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 acknowledgment:
|
|
||||||
* "This product includes software developed by the
|
|
||||||
* Apache Software Foundation (http://www.apache.org/)."
|
|
||||||
* Alternately, this acknowledgment may appear in the software itself,
|
|
||||||
* if and wherever such third-party acknowledgments normally appear.
|
|
||||||
*
|
|
||||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
|
||||||
* "Apache POI" must not be used to endorse or promote products
|
|
||||||
* derived from this software without prior written permission. For
|
|
||||||
* written permission, please contact apache@apache.org.
|
|
||||||
*
|
|
||||||
* 5. Products derived from this software may not be called "Apache",
|
|
||||||
* "Apache POI", nor may "Apache" appear in their name, without
|
|
||||||
* prior written permission of the Apache Software Foundation.
|
|
||||||
*
|
|
||||||
* 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/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.apache.poi.util;
|
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileInputStream;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tests the log class.
|
|
||||||
*
|
|
||||||
* @author Glen Stampoultzis (glens at apache.org)
|
|
||||||
* @author Marc Johnson (mjohnson at apache dot org)
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class TestPOILogger
|
|
||||||
extends TestCase
|
|
||||||
{
|
|
||||||
private String _test_file_path;
|
|
||||||
private static final String _test_file_path_property =
|
|
||||||
"UTIL.testdata.path";
|
|
||||||
private static final String _fs =
|
|
||||||
System.getProperty("file.separator");
|
|
||||||
private static final String _log_file = "POILogger.log";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor TestPOILogger
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @param s
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
public TestPOILogger(String s)
|
|
||||||
{
|
|
||||||
super(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method setUp
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @exception Exception
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
protected void setUp()
|
|
||||||
throws Exception
|
|
||||||
{
|
|
||||||
super.setUp();
|
|
||||||
_test_file_path = System.getProperty(_test_file_path_property) + _fs;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test different types of log output.
|
|
||||||
*
|
|
||||||
* @exception Exception
|
|
||||||
*/
|
|
||||||
|
|
||||||
public void testVariousLogTypes()
|
|
||||||
throws Exception
|
|
||||||
{
|
|
||||||
assertTrue(
|
|
||||||
"Checking for existance of test property directory, looking for "
|
|
||||||
+ _test_file_path, new File(_test_file_path).exists());
|
|
||||||
new File(_log_file).delete();
|
|
||||||
POILogFactory f1 = new POILogFactory(_test_file_path
|
|
||||||
+ "test_properties3", "foo");
|
|
||||||
POILogger log = f1.getLogger(getClass());
|
|
||||||
|
|
||||||
log.log(POILogger.WARN, "Test = ", new Integer(1));
|
|
||||||
log.logFormatted(POILogger.ERROR, "Test param 1 = %, param 2 = %",
|
|
||||||
"2", new Integer(3));
|
|
||||||
log.logFormatted(POILogger.ERROR, "Test param 1 = %, param 2 = %",
|
|
||||||
new int[]
|
|
||||||
{
|
|
||||||
4, 5
|
|
||||||
});
|
|
||||||
log.logFormatted(POILogger.ERROR,
|
|
||||||
"Test param 1 = %1.1, param 2 = %0.1", new double[]
|
|
||||||
{
|
|
||||||
4, 5.23
|
|
||||||
});
|
|
||||||
|
|
||||||
// It appears necessary that sleep is required for files to be
|
|
||||||
// written on Win2000. Tried manually closing appenders with
|
|
||||||
// no luck.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Thread.sleep(4000);
|
|
||||||
}
|
|
||||||
catch (InterruptedException letBuffersFlush)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
String s = fileRead(_log_file);
|
|
||||||
|
|
||||||
assertTrue(s.indexOf("Test = 1") > 0);
|
|
||||||
assertTrue(s.indexOf("Test param 1 = 2, param 2 = 3") > 0);
|
|
||||||
assertTrue(s.indexOf("Test param 1 = 4, param 2 = 5") > 0);
|
|
||||||
assertTrue(s.indexOf("Test param 1 = 4, param 2 = 5.2") > 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reads the contents of a file.
|
|
||||||
*
|
|
||||||
* @param fileName The name of the file to read.
|
|
||||||
* @return The file contents or null if read failed.
|
|
||||||
*
|
|
||||||
* @exception Exception
|
|
||||||
*/
|
|
||||||
|
|
||||||
public String fileRead(String fileName)
|
|
||||||
throws Exception
|
|
||||||
{
|
|
||||||
StringBuffer buf = new StringBuffer();
|
|
||||||
FileInputStream in = new FileInputStream(fileName);
|
|
||||||
int count;
|
|
||||||
byte[] b = new byte[ 512 ];
|
|
||||||
|
|
||||||
while ((count = in.read(b)) > 0) // blocking read
|
|
||||||
{
|
|
||||||
buf.append(new String(b, 0, count));
|
|
||||||
}
|
|
||||||
in.close();
|
|
||||||
return buf.toString();
|
|
||||||
}
|
|
||||||
}
|
|
0
tools/lib/ant-1.4.1-optional.jar → tools/ant/lib/ant-1.4.1-optional.jar
Executable file → Normal file
0
tools/lib/ant-1.4.1-optional.jar → tools/ant/lib/ant-1.4.1-optional.jar
Executable file → Normal file
0
tools/lib/ant-1.4.1.jar → tools/ant/lib/ant-1.4.1.jar
Executable file → Normal file
0
tools/lib/ant-1.4.1.jar → tools/ant/lib/ant-1.4.1.jar
Executable file → Normal file
107
tools/bin/ant
107
tools/bin/ant
@ -1,107 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
|
|
||||||
if [ -f "$HOME/.antrc" ] ; then
|
|
||||||
. $HOME/.antrc
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Cygwin support. $cygwin _must_ be set to either true or false.
|
|
||||||
case "`uname`" in
|
|
||||||
CYGWIN*) cygwin=true ;;
|
|
||||||
*) cygwin=false ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# 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 [ "$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`
|
|
||||||
|
|
||||||
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"`/..
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$JAVA_HOME" != "" ] ; then
|
|
||||||
if [ "$JAVACMD" = "" ] ; then
|
|
||||||
JAVACMD=$JAVA_HOME/bin/java
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [ "$JAVACMD" = "" ] ; then
|
|
||||||
JAVACMD=java
|
|
||||||
fi
|
|
||||||
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
|
|
||||||
LOCALCLASSPATH=$LOCALCLASSPATH:"$i"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "$CLASSPATH" != "" ] ; then
|
|
||||||
LOCALCLASSPATH=$CLASSPATH:$LOCALCLASSPATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$JAVA_HOME" != "" ] ; then
|
|
||||||
if test -f $JAVA_HOME/lib/tools.jar ; then
|
|
||||||
LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -f $JAVA_HOME/lib/classes.zip ; then
|
|
||||||
LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
|
|
||||||
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 [ "$JIKESPATH" != "" ] ; then
|
|
||||||
if [ "$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"`
|
|
||||||
LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"`
|
|
||||||
fi
|
|
||||||
|
|
||||||
$JAVACMD -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" $ANT_OPTS org.apache.tools.ant.Main "$@"
|
|
@ -1,97 +0,0 @@
|
|||||||
@echo off
|
|
||||||
|
|
||||||
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:\bin\=%
|
|
||||||
|
|
||||||
if %ANT_HOME%a==a set ANT_HOME=%DEFAULT_ANT_HOME%
|
|
||||||
set DEFAULT_ANT_HOME=
|
|
||||||
|
|
||||||
rem On NT/2K grab all arguments at once
|
|
||||||
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" goto noAntHome
|
|
||||||
set ANT_HOME=%SystemDrive%\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 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_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_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,9 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
|
|
||||||
# Args: DIR command
|
|
||||||
cd "$1"
|
|
||||||
CMD="$2"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
|
|
||||||
exec $CMD "$@"
|
|
@ -1,20 +0,0 @@
|
|||||||
@echo off
|
|
||||||
|
|
||||||
# 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,216 +0,0 @@
|
|||||||
#! /usr/bin/env python
|
|
||||||
#
|
|
||||||
# Mass string translation for java/xml files (change Wanted re for other files)
|
|
||||||
#
|
|
||||||
# Author: Peter Donald <donaldp@apache.org>
|
|
||||||
#
|
|
||||||
# Adapted from fixid.py in python distribution under Tools
|
|
||||||
#
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import re
|
|
||||||
import string
|
|
||||||
import os
|
|
||||||
from stat import *
|
|
||||||
import getopt
|
|
||||||
|
|
||||||
err = sys.stderr.write
|
|
||||||
dbg = err
|
|
||||||
out = sys.stdout.write
|
|
||||||
|
|
||||||
def usage():
|
|
||||||
progname = sys.argv[0]
|
|
||||||
err('Usage: ' + progname + ' [-s file] ... file-or-directory ...\n')
|
|
||||||
err('\n')
|
|
||||||
err('-s substfile : add a file of substitutions\n')
|
|
||||||
err('\n')
|
|
||||||
err('Each non-empty non-comment line in a substitution file must\n')
|
|
||||||
err('contain exactly two words separated by a | character.\n')
|
|
||||||
|
|
||||||
def main():
|
|
||||||
try:
|
|
||||||
opts, args = getopt.getopt(sys.argv[1:], 'crs:')
|
|
||||||
except getopt.error, msg:
|
|
||||||
err('Options error: ' + str(msg) + '\n')
|
|
||||||
usage()
|
|
||||||
sys.exit(2)
|
|
||||||
bad = 0
|
|
||||||
if not args: # No arguments
|
|
||||||
usage()
|
|
||||||
sys.exit(2)
|
|
||||||
for opt, arg in opts:
|
|
||||||
if opt == '-s':
|
|
||||||
addsubst(arg)
|
|
||||||
initre()
|
|
||||||
for arg in args:
|
|
||||||
if os.path.isdir(arg):
|
|
||||||
if recursedown(arg): bad = 1
|
|
||||||
elif os.path.islink(arg):
|
|
||||||
err(arg + ': will not process symbolic links\n')
|
|
||||||
bad = 1
|
|
||||||
else:
|
|
||||||
if fix(arg): bad = 1
|
|
||||||
sys.exit(bad)
|
|
||||||
|
|
||||||
# Change this regular expression to select a different set of files
|
|
||||||
Wanted = '^[a-zA-Z0-9_\-]+\.(java|xml|xinfo)$'
|
|
||||||
def wanted(name):
|
|
||||||
return None <> re.match(Wanted, name)
|
|
||||||
|
|
||||||
def recursedown(dirname):
|
|
||||||
dbg('recursedown(' + `dirname` + ')\n')
|
|
||||||
bad = 0
|
|
||||||
try:
|
|
||||||
names = os.listdir(dirname)
|
|
||||||
except os.error, msg:
|
|
||||||
err(dirname + ': cannot list directory: ' + str(msg) + '\n')
|
|
||||||
return 1
|
|
||||||
names.sort()
|
|
||||||
subdirs = []
|
|
||||||
for name in names:
|
|
||||||
if name in (os.curdir, os.pardir): continue
|
|
||||||
fullname = os.path.join(dirname, name)
|
|
||||||
if os.path.islink(fullname): pass
|
|
||||||
elif os.path.isdir(fullname):
|
|
||||||
subdirs.append(fullname)
|
|
||||||
elif wanted(name):
|
|
||||||
if fix(fullname): bad = 1
|
|
||||||
for fullname in subdirs:
|
|
||||||
if recursedown(fullname): bad = 1
|
|
||||||
return bad
|
|
||||||
|
|
||||||
def fix(filename):
|
|
||||||
dbg('fix(' + `filename` + ')\n')
|
|
||||||
|
|
||||||
# File replacement mode
|
|
||||||
try:
|
|
||||||
f = open(filename, 'r')
|
|
||||||
except IOError, msg:
|
|
||||||
err(filename + ': cannot open: ' + str(msg) + '\n')
|
|
||||||
return 1
|
|
||||||
|
|
||||||
head, tail = os.path.split(filename)
|
|
||||||
tempname = os.path.join(head, '@' + tail)
|
|
||||||
|
|
||||||
# If we find a match, we rewind the file and start over but
|
|
||||||
# now copy everything to a temp file.
|
|
||||||
lineno = 0
|
|
||||||
g = None
|
|
||||||
while 1:
|
|
||||||
line = f.readline()
|
|
||||||
if not line: break
|
|
||||||
lineno = lineno + 1
|
|
||||||
newline = fixline(line)
|
|
||||||
if newline != line:
|
|
||||||
if g is None:
|
|
||||||
try:
|
|
||||||
g = open(tempname, 'w')
|
|
||||||
except IOError, msg:
|
|
||||||
f.close()
|
|
||||||
err(tempname+': cannot create: '+
|
|
||||||
str(msg)+'\n')
|
|
||||||
return 1
|
|
||||||
f.seek(0)
|
|
||||||
lineno = 0
|
|
||||||
out(filename + ':\n')
|
|
||||||
continue # restart from the beginning
|
|
||||||
out(`lineno` + '\n')
|
|
||||||
out('< ' + line)
|
|
||||||
out('> ' + newline)
|
|
||||||
if g is not None:
|
|
||||||
g.write(newline)
|
|
||||||
|
|
||||||
# End of file
|
|
||||||
f.close()
|
|
||||||
if not g: return 0 # No changes
|
|
||||||
|
|
||||||
# Finishing touch -- move files
|
|
||||||
|
|
||||||
# First copy the file's mode to the temp file
|
|
||||||
try:
|
|
||||||
statbuf = os.stat(filename)
|
|
||||||
os.chmod(tempname, statbuf[ST_MODE] & 07777)
|
|
||||||
except os.error, msg:
|
|
||||||
err(tempname + ': warning: chmod failed (' + str(msg) + ')\n')
|
|
||||||
|
|
||||||
# Then make a backup of the original file as filename~
|
|
||||||
try:
|
|
||||||
os.rename(filename, filename + '~')
|
|
||||||
except os.error, msg:
|
|
||||||
err(filename + ': warning: backup failed (' + str(msg) + ')\n')
|
|
||||||
|
|
||||||
# Now move the temp file to the original file
|
|
||||||
try:
|
|
||||||
os.rename(tempname, filename)
|
|
||||||
except os.error, msg:
|
|
||||||
err(filename + ': rename failed (' + str(msg) + ')\n')
|
|
||||||
return 1
|
|
||||||
|
|
||||||
# Return succes
|
|
||||||
return 0
|
|
||||||
|
|
||||||
def initre():
|
|
||||||
global SearcherExpr
|
|
||||||
|
|
||||||
keys = Dict.keys()
|
|
||||||
keyCount = len(keys)
|
|
||||||
i = 0
|
|
||||||
reStr = ""
|
|
||||||
while i < len(keys):
|
|
||||||
if i != 0: reStr = reStr + '|'
|
|
||||||
reStr = reStr + keys[i]
|
|
||||||
i = i + 1
|
|
||||||
SearcherExpr = re.compile( reStr )
|
|
||||||
|
|
||||||
def fixline(line):
|
|
||||||
global Program
|
|
||||||
## print '-->', `line`
|
|
||||||
i = 0
|
|
||||||
|
|
||||||
while i < len(line):
|
|
||||||
match = SearcherExpr.search(line, i)
|
|
||||||
if match == None: break
|
|
||||||
found = match.group(0)
|
|
||||||
i = match.start()
|
|
||||||
n = len(found)
|
|
||||||
if Dict.has_key(found):
|
|
||||||
subst = Dict[found]
|
|
||||||
|
|
||||||
line = line[:i] + subst + line[i+n:]
|
|
||||||
n = len(subst)
|
|
||||||
i = i + n
|
|
||||||
return line
|
|
||||||
|
|
||||||
Dict = {}
|
|
||||||
NotInComment = {}
|
|
||||||
|
|
||||||
def addsubst(substfile):
|
|
||||||
try:
|
|
||||||
fp = open(substfile, 'r')
|
|
||||||
except IOError, msg:
|
|
||||||
err(substfile + ': cannot read substfile: ' + str(msg) + '\n')
|
|
||||||
sys.exit(1)
|
|
||||||
lineno = 0
|
|
||||||
|
|
||||||
while 1:
|
|
||||||
line = fp.readline()
|
|
||||||
if not line: break
|
|
||||||
lineno = lineno + 1
|
|
||||||
try:
|
|
||||||
i = string.index(line, '#')
|
|
||||||
except string.index_error:
|
|
||||||
i = -1 # Happens to delete trailing \n
|
|
||||||
words = string.split(line[:i],'|')
|
|
||||||
if not words: continue
|
|
||||||
if len(words) <> 2:
|
|
||||||
err(substfile + ':' + `lineno` + ': warning: bad line: ' + line)
|
|
||||||
continue
|
|
||||||
[key, value] = words
|
|
||||||
|
|
||||||
## print 'Will replace ', key, ' with ', value
|
|
||||||
|
|
||||||
Dict[key] = value
|
|
||||||
|
|
||||||
fp.close()
|
|
||||||
|
|
||||||
main()
|
|
@ -1,2 +0,0 @@
|
|||||||
set LOCALCLASSPATH=%1;%LOCALCLASSPATH%
|
|
||||||
|
|
@ -1,131 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
#######################################################################
|
|
||||||
#
|
|
||||||
# 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 steve_l@sourceforge.net
|
|
||||||
#######################################################################
|
|
||||||
#
|
|
||||||
# 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"))
|
|
||||||
{
|
|
||||||
$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";
|
|
||||||
}
|
|
||||||
|
|
||||||
#jikes
|
|
||||||
my @ANT_OPTS=split $ENV{ANT_OPTS};
|
|
||||||
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";
|
|
||||||
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;
|
|
||||||
}
|
|
BIN
tools/centipede/lib/IzPress.jar
Normal file
BIN
tools/centipede/lib/IzPress.jar
Normal file
Binary file not shown.
0
tools/lib/junit.jar → tools/centipede/lib/junit.jar
Executable file → Normal file
0
tools/lib/junit.jar → tools/centipede/lib/junit.jar
Executable file → Normal file
BIN
tools/centipede/lib/xerces.jar
Normal file
BIN
tools/centipede/lib/xerces.jar
Normal file
Binary file not shown.
BIN
tools/centipede/lib/xml-apis.jar
Normal file
BIN
tools/centipede/lib/xml-apis.jar
Normal file
Binary file not shown.
@ -21,6 +21,12 @@
|
|||||||
<fileset dir="${scratchpad.src}"/>
|
<fileset dir="${scratchpad.src}"/>
|
||||||
</copy>
|
</copy>
|
||||||
|
|
||||||
|
<mkdir dir="${build.examples.src}"/>
|
||||||
|
<mkdir dir="${build.examples.dest}"/>
|
||||||
|
<copy todir="${build.examples.src}" filtering="on">
|
||||||
|
<fileset dir="${examples.src}"/>
|
||||||
|
</copy>
|
||||||
|
|
||||||
<mkdir dir="${build.contrib.src}"/>
|
<mkdir dir="${build.contrib.src}"/>
|
||||||
<mkdir dir="${build.contrib.dest}"/>
|
<mkdir dir="${build.contrib.dest}"/>
|
||||||
<copy todir="${build.contrib.src}" filtering="on">
|
<copy todir="${build.contrib.src}" filtering="on">
|
||||||
@ -66,6 +72,27 @@
|
|||||||
<classpath refid="scratchpad.classpath"/>
|
<classpath refid="scratchpad.classpath"/>
|
||||||
</javac>
|
</javac>
|
||||||
|
|
||||||
|
<copy todir="${build.examples.dest}">
|
||||||
|
<fileset dir="${build.examples.src}">
|
||||||
|
<include name="**"/>
|
||||||
|
<!--
|
||||||
|
<include name="**/Manifest.mf"/>
|
||||||
|
<include name="**/*.xsl"/>
|
||||||
|
<include name="**/*.roles"/>
|
||||||
|
<include name="**/*.xconf"/>
|
||||||
|
<include name="META-INF/**"/>
|
||||||
|
-->
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
|
||||||
|
<javac srcdir="${build.examples.src}"
|
||||||
|
destdir="${build.examples.dest}"
|
||||||
|
debug="${debug}"
|
||||||
|
optimize="${optimize}"
|
||||||
|
deprecation="${deprecation}"
|
||||||
|
target="${target.vm}">
|
||||||
|
<classpath refid="examples.classpath"/>
|
||||||
|
</javac>
|
||||||
|
|
||||||
<copy todir="${build.contrib.dest}">
|
<copy todir="${build.contrib.dest}">
|
||||||
<fileset dir="${build.contrib.src}">
|
<fileset dir="${build.contrib.src}">
|
||||||
@ -102,6 +129,12 @@
|
|||||||
</fileset>
|
</fileset>
|
||||||
</jar>
|
</jar>
|
||||||
|
|
||||||
|
<jar jarfile="${build.dir}/${examples.name}.jar">
|
||||||
|
<fileset dir="${build.examples.dest}">
|
||||||
|
<include name="**"/>
|
||||||
|
</fileset>
|
||||||
|
</jar>
|
||||||
|
|
||||||
<jar jarfile="${build.dir}/${contrib.name}.jar">
|
<jar jarfile="${build.dir}/${contrib.name}.jar">
|
||||||
<fileset dir="${build.contrib.dest}">
|
<fileset dir="${build.contrib.dest}">
|
||||||
<include name="**"/>
|
<include name="**"/>
|
||||||
|
@ -83,6 +83,11 @@
|
|||||||
<property name="scratchpad.lib" value="${scratchpad.dir}/lib"/>
|
<property name="scratchpad.lib" value="${scratchpad.dir}/lib"/>
|
||||||
<property name="scratchpad.name" value="${name}-scratchpad"/>
|
<property name="scratchpad.name" value="${name}-scratchpad"/>
|
||||||
|
|
||||||
|
<property name="examples.dir" value="${src.dir}/examples"/>
|
||||||
|
<property name="examples.src" value="${examples.dir}/src"/>
|
||||||
|
<property name="examples.lib" value="${examples.dir}/lib"/>
|
||||||
|
<property name="examples.name" value="${name}-examples"/>
|
||||||
|
|
||||||
<property name="contrib.dir" value="${src.dir}/contrib"/>
|
<property name="contrib.dir" value="${src.dir}/contrib"/>
|
||||||
<property name="contrib.src" value="${contrib.dir}/src"/>
|
<property name="contrib.src" value="${contrib.dir}/src"/>
|
||||||
<property name="contrib.lib" value="${contrib.dir}/lib"/>
|
<property name="contrib.lib" value="${contrib.dir}/lib"/>
|
||||||
@ -101,6 +106,9 @@
|
|||||||
<property name="build.scratchpad" value="${build.dir}/scratchpad"/>
|
<property name="build.scratchpad" value="${build.dir}/scratchpad"/>
|
||||||
<property name="build.scratchpad.src" value="${build.scratchpad}/src"/>
|
<property name="build.scratchpad.src" value="${build.scratchpad}/src"/>
|
||||||
<property name="build.scratchpad.dest" value="${build.scratchpad}/classes"/>
|
<property name="build.scratchpad.dest" value="${build.scratchpad}/classes"/>
|
||||||
|
<property name="build.examples" value="${build.dir}/examples"/>
|
||||||
|
<property name="build.examples.src" value="${build.examples}/src"/>
|
||||||
|
<property name="build.examples.dest" value="${build.examples}/classes"/>
|
||||||
<property name="build.contrib" value="${build.dir}/contrib"/>
|
<property name="build.contrib" value="${build.dir}/contrib"/>
|
||||||
<property name="build.contrib.src" value="${build.contrib}/src"/>
|
<property name="build.contrib.src" value="${build.contrib}/src"/>
|
||||||
<property name="build.contrib.dest" value="${build.contrib}/classes"/>
|
<property name="build.contrib.dest" value="${build.contrib}/classes"/>
|
||||||
|
@ -33,6 +33,11 @@
|
|||||||
</fileset>
|
</fileset>
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
|
<path id="examples.classpath">
|
||||||
|
<!-- FIXME : how to build a path that references a property set in 'init' target ? -->
|
||||||
|
<pathelement path="./build/jakarta-poi/classes"/>
|
||||||
|
</path>
|
||||||
|
|
||||||
<path id="scratchpad.classpath">
|
<path id="scratchpad.classpath">
|
||||||
<fileset dir="./lib/core">
|
<fileset dir="./lib/core">
|
||||||
<include name="*.jar"/>
|
<include name="*.jar"/>
|
||||||
@ -61,3 +66,4 @@
|
|||||||
<pathelement path="./build/jakarta-poi/classes"/>
|
<pathelement path="./build/jakarta-poi/classes"/>
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,6 +20,10 @@
|
|||||||
</classpath>
|
</classpath>
|
||||||
</javac>
|
</javac>
|
||||||
<junit printsummary="yes" haltonfailure="yes" fork="yes">
|
<junit printsummary="yes" haltonfailure="yes" fork="yes">
|
||||||
|
<sysproperty key="UTIL.testdata.path"
|
||||||
|
value="${test.dir}/org/apache/poi/util/data"/>
|
||||||
|
<sysproperty key="HSSF.testdata.path"
|
||||||
|
value="${test.dir}/org/apache/poi/hssf/data"/>
|
||||||
<classpath>
|
<classpath>
|
||||||
<pathelement location="${build.test}" />
|
<pathelement location="${build.test}" />
|
||||||
<pathelement location="${build.dest}" />
|
<pathelement location="${build.dest}" />
|
||||||
|
Binary file not shown.
Binary file not shown.
BIN
tools/cocoon/lib/avalon-scratchpad-20020212.jar
Normal file
BIN
tools/cocoon/lib/avalon-scratchpad-20020212.jar
Normal file
Binary file not shown.
BIN
tools/cocoon/lib/batik-libs-1.1.1.jar
Normal file
BIN
tools/cocoon/lib/batik-libs-1.1.1.jar
Normal file
Binary file not shown.
BIN
tools/cocoon/lib/cocoon-scratchpad-part.jar
Normal file
BIN
tools/cocoon/lib/cocoon-scratchpad-part.jar
Normal file
Binary file not shown.
BIN
tools/cocoon/lib/cocoon.jar
Normal file
BIN
tools/cocoon/lib/cocoon.jar
Normal file
Binary file not shown.
BIN
tools/cocoon/lib/jisp_1_0_2.jar
Normal file
BIN
tools/cocoon/lib/jisp_1_0_2.jar
Normal file
Binary file not shown.
BIN
tools/cocoon/lib/logkit-1.0.1.jar
Normal file
BIN
tools/cocoon/lib/logkit-1.0.1.jar
Normal file
Binary file not shown.
BIN
tools/cocoon/lib/resolver-20020130.jar
Normal file
BIN
tools/cocoon/lib/resolver-20020130.jar
Normal file
Binary file not shown.
@ -1,3 +0,0 @@
|
|||||||
xalan-2.2.0-D14.jar
|
|
||||||
xerces-1.4.4.jar
|
|
||||||
xml-apis.jar
|
|
Binary file not shown.
Binary file not shown.
@ -1,89 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
||||||
|
|
||||||
<xsl:output method="html" indent="yes"/>
|
|
||||||
|
|
||||||
<xsl:template match="changes">
|
|
||||||
<xsl:variable name="version" select="@version"/>
|
|
||||||
<xsl:apply-templates select="document(@file,/)/changes/release[attribute::version=string($version)]"/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="announcement">
|
|
||||||
<style>
|
|
||||||
body { background-color: #FFFFFF }
|
|
||||||
p { font-size: 10pt; font-family: Helvetica, Arial, sans-serif }
|
|
||||||
li,ul { font-size: 10pt; font-family: Helvetica, Arial, sans-serif }
|
|
||||||
div { font-size: 10pt; font-family: Helvetica, Arial, sans-serif; font-style:italic }
|
|
||||||
h1 { font-size: 14pt; font-family: Helvetica, Arial, sans-serif; font-weight: bold }
|
|
||||||
h2 { font-size: 12pt; font-family: Helvetica, Arial, sans-serif; font-weight: bold }
|
|
||||||
h3 { font-size: 10pt; font-family: Helvetica, Arial, sans-serif; font-weight: bold }
|
|
||||||
A:link { color: #0000A0 } /* unvisited link */
|
|
||||||
A:visited { color: #A00000 } /* visited links */
|
|
||||||
A:active { color: #00A000 } /* active links */
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<a name="sig"><h2>PGP Signatures</h2></a>
|
|
||||||
|
|
||||||
<p>Many of the distribution kits have been digitally signed (using
|
|
||||||
PGP). If so, there will be an accompanying
|
|
||||||
<samp><em>distribution</em>.asc</samp> file in the same directory as
|
|
||||||
the distribution. The PGP keys can be found in the distribution
|
|
||||||
directory at <<a href="http://jakarta.apache.org/builds/jakarta-avalon/release/KEYS">
|
|
||||||
<samp>http://jakarta.apache.org/builds/jakarta-avalon/release/KEYS</samp></a>>.</p>
|
|
||||||
|
|
||||||
<xsl:variable name="filename"><xsl:value-of
|
|
||||||
select="project/downloads/@name"/>-<xsl:value-of
|
|
||||||
select="project/changes/@version"/>-bin.tar.gz</xsl:variable>
|
|
||||||
|
|
||||||
<pre>Always test available signatures, <i>e.g.</i>,
|
|
||||||
> pgpk -a KEYS
|
|
||||||
> pgpv <xsl:value-of select="$filename"/>.asc
|
|
||||||
<i>or</i>,
|
|
||||||
> pgp -ka KEYS
|
|
||||||
> pgp <xsl:value-of select="$filename"/>.asc
|
|
||||||
<i>or</i>,
|
|
||||||
> gpg --import KEYS
|
|
||||||
> gpg --verify <xsl:value-of select="$filename"/>.asc
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<xsl:for-each select="project">
|
|
||||||
<xsl:if test="downloads">
|
|
||||||
<h2>About <xsl:value-of select="title"/></h2>
|
|
||||||
<xsl:apply-templates select="."/>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:for-each>
|
|
||||||
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="project">
|
|
||||||
|
|
||||||
<p>For more information about <xsl:value-of select="title"/>, please go to
|
|
||||||
<a><xsl:attribute name="href"><xsl:value-of select="@site"/></xsl:attribute>
|
|
||||||
<xsl:value-of select="@site"/></a>.</p>
|
|
||||||
|
|
||||||
<!-- print out ChangeLog if present -->
|
|
||||||
<xsl:if test="changes">
|
|
||||||
<h3>ChangeLog for <xsl:value-of select="title"/></h3>
|
|
||||||
<xsl:apply-templates select="changes"/>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="ulink">
|
|
||||||
<a href="{@uri}"><xsl:value-of select="."/></a>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="release">
|
|
||||||
<ul>
|
|
||||||
<xsl:for-each select="action">
|
|
||||||
<li>
|
|
||||||
<xsl:value-of select="normalize-space(.)"/>
|
|
||||||
<xsl:if test="@dev">
|
|
||||||
<xsl:text>[</xsl:text><xsl:value-of select="@dev"/><xsl:text>]</xsl:text>
|
|
||||||
</xsl:if>
|
|
||||||
</li>
|
|
||||||
</xsl:for-each>
|
|
||||||
</ul>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
@ -1,174 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
||||||
|
|
||||||
<xsl:output method="text" indent="no"/>
|
|
||||||
|
|
||||||
<xsl:template match="changes">
|
|
||||||
<xsl:variable name="version" select="@version"/>
|
|
||||||
<xsl:apply-templates select="document(@file,/)/changes/release[attribute::version=string($version)]"/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template name="print-title">
|
|
||||||
<xsl:param name="title"/>
|
|
||||||
<xsl:variable name="text" select="normalize-space($title)"/>
|
|
||||||
<xsl:value-of select="$text"/><xsl:text>
|
|
||||||
</xsl:text>
|
|
||||||
<xsl:call-template name="line">
|
|
||||||
<xsl:with-param name="len" select="string-length($text)"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
<xsl:text>
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="announcement">
|
|
||||||
<text>
|
|
||||||
<xsl:call-template name="print-title">
|
|
||||||
<xsl:with-param name="title"><xsl:value-of select="title"/> Released</xsl:with-param>
|
|
||||||
</xsl:call-template>
|
|
||||||
<xsl:call-template name="word-wrap">
|
|
||||||
<xsl:with-param name="text" select="normalize-space(abstract)"/>
|
|
||||||
<xsl:with-param name="count" select="0"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
<xsl:text>
|
|
||||||
|
|
||||||
</xsl:text>
|
|
||||||
<xsl:for-each select="project">
|
|
||||||
<xsl:call-template name="print-title">
|
|
||||||
<xsl:with-param name="title">About <xsl:value-of select="title"/></xsl:with-param>
|
|
||||||
</xsl:call-template>
|
|
||||||
<xsl:apply-templates select="."/>
|
|
||||||
<xsl:text>
|
|
||||||
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:for-each>
|
|
||||||
</text>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="project">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="description/para">
|
|
||||||
<xsl:for-each select="description/para">
|
|
||||||
<xsl:call-template name="word-wrap">
|
|
||||||
<xsl:with-param name="text">
|
|
||||||
<xsl:apply-templates select="."/>
|
|
||||||
</xsl:with-param>
|
|
||||||
<xsl:with-param name="count" select="0"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
<xsl:text>
|
|
||||||
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:for-each>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:call-template name="word-wrap">
|
|
||||||
<xsl:with-param name="text">
|
|
||||||
<xsl:apply-templates select="description"/>
|
|
||||||
</xsl:with-param>
|
|
||||||
<xsl:with-param name="count" select="0"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
<xsl:text>
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
<xsl:text>
|
|
||||||
For more information about </xsl:text>
|
|
||||||
<xsl:value-of select="title"/>
|
|
||||||
<xsl:text>, please go to
|
|
||||||
</xsl:text>
|
|
||||||
<xsl:value-of select="@site"/>
|
|
||||||
|
|
||||||
<!-- print out ChangeLog if present -->
|
|
||||||
<xsl:if test="changes">
|
|
||||||
<xsl:text>
|
|
||||||
|
|
||||||
ChangeLog for </xsl:text>
|
|
||||||
<xsl:value-of select="title"/>
|
|
||||||
<xsl:text>
|
|
||||||
|
|
||||||
</xsl:text>
|
|
||||||
<xsl:apply-templates select="changes"/>
|
|
||||||
</xsl:if>
|
|
||||||
|
|
||||||
<!-- print out Downloads if present -->
|
|
||||||
<xsl:if test="downloads">
|
|
||||||
<xsl:text>
|
|
||||||
Downloads for </xsl:text><xsl:value-of select="title"/> available at
|
|
||||||
|
|
||||||
<xsl:value-of select="downloads/@base"/>/latest
|
|
||||||
</xsl:if>
|
|
||||||
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="para">
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
<xsl:text>
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="ulink">
|
|
||||||
<xsl:value-of select="."/>
|
|
||||||
<xsl:text> (</xsl:text>
|
|
||||||
<xsl:value-of select="@uri"/>
|
|
||||||
<xsl:text>)</xsl:text>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="release">
|
|
||||||
<xsl:for-each select="action">
|
|
||||||
<xsl:text>*) </xsl:text>
|
|
||||||
<xsl:call-template name="word-wrap">
|
|
||||||
<xsl:with-param name="text" select="."/>
|
|
||||||
<xsl:with-param name="count" select="0"/>
|
|
||||||
</xsl:call-template><xsl:text> </xsl:text>
|
|
||||||
<xsl:if test="@dev">
|
|
||||||
<xsl:text>[</xsl:text><xsl:value-of select="@dev"/><xsl:text>]</xsl:text>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:text>
|
|
||||||
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:for-each>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template name="line">
|
|
||||||
<xsl:param name="len"/>
|
|
||||||
<xsl:if test="number($len) > 0">
|
|
||||||
<xsl:text>-</xsl:text>
|
|
||||||
<xsl:call-template name="line">
|
|
||||||
<xsl:with-param name="len" select="number($len)-1"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template name="word-wrap">
|
|
||||||
<xsl:param name="text"/>
|
|
||||||
<xsl:param name="count"/>
|
|
||||||
<xsl:param name="mytext" select="normalize-space($text)"/>
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="$count > 40">
|
|
||||||
<xsl:text>
|
|
||||||
</xsl:text>
|
|
||||||
<xsl:call-template name="word-wrap">
|
|
||||||
<xsl:with-param name="text" select="$mytext"/>
|
|
||||||
<xsl:with-param name="count" select="0"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:when test="not(contains($mytext,' '))">
|
|
||||||
<xsl:text> </xsl:text>
|
|
||||||
<xsl:value-of select="$mytext"/>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:variable name="word" select="substring-before($mytext,' ')"/>
|
|
||||||
<xsl:variable name="remainder" select="substring-after($mytext,' ')"/>
|
|
||||||
<xsl:text> </xsl:text>
|
|
||||||
<xsl:value-of select="$word"/>
|
|
||||||
<xsl:if test="string-length($word) > 0">
|
|
||||||
<xsl:call-template name="word-wrap">
|
|
||||||
<xsl:with-param name="text" select="$remainder"/>
|
|
||||||
<xsl:with-param name="count" select="$count + string-length($word)"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
@ -1,36 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<xsl:stylesheet version="1.0"
|
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
||||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
|
||||||
|
|
||||||
<!-- @author <a href="mailto:barozzi@nicolaken.com">Nicola Ken Barozzi</a> -->
|
|
||||||
|
|
||||||
<xsl:template match="html:body">
|
|
||||||
<patch-queue>
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</patch-queue>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="html:tr">
|
|
||||||
<xsl:if test="contains(@class,'th')">
|
|
||||||
<bug>
|
|
||||||
<xsl:attribute name="id"><xsl:value-of select="html:td[1]/html:a"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="url">http://nagoya.apache.org/bugzilla/<xsl:value-of select="html:td[1]/html:a/@href"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="severity"><xsl:value-of select="html:td[2]"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="priority"><xsl:value-of select="html:td[3]"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="platform"><xsl:value-of select="html:td[4]"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="owner"><xsl:value-of select="html:td[5]"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="status"><xsl:value-of select="html:td[6]"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="resolution"><xsl:value-of select="html:td[7]"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="summary"><xsl:value-of select="html:td[8]"/></xsl:attribute>
|
|
||||||
</bug>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="@*|*|text()|processing-instruction()">
|
|
||||||
<xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
||||||
|
|
@ -1,95 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
|
||||||
|
|
||||||
<xsl:output indent="yes"/>
|
|
||||||
|
|
||||||
<xsl:param name="module">module</xsl:param>
|
|
||||||
<xsl:param name="cvsweb">cvsweb</xsl:param>
|
|
||||||
|
|
||||||
<xsl:template match="/">
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" type="text/css" href="../../../../html/javadoc.css" title="Style"></link>
|
|
||||||
</head>
|
|
||||||
<body bgcolor="white">
|
|
||||||
<h1>Change Log</h1>
|
|
||||||
|
|
||||||
<xsl:apply-templates select="changelog/entry">
|
|
||||||
<xsl:sort order="descending" select="date" />
|
|
||||||
</xsl:apply-templates>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="entry">
|
|
||||||
|
|
||||||
<h2>
|
|
||||||
<xsl:call-template name="escape-return">
|
|
||||||
<xsl:with-param name="string"><xsl:value-of select="msg"/></xsl:with-param>
|
|
||||||
</xsl:call-template>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
<b>
|
|
||||||
<xsl:apply-templates select="date"/>
|
|
||||||
by <xsl:value-of disable-output-escaping="yes" select="author"/>
|
|
||||||
</b>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<xsl:apply-templates select="file"/>
|
|
||||||
</p>
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="date">
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="weekday">
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="time">
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="file">
|
|
||||||
<br/><a>
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="string-length(prevrevision) = 0 ">
|
|
||||||
<xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?rev=<xsl:value-of select="revision" />&content-type=text/x-cvsweb-markup</xsl:attribute>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?r1=<xsl:value-of select="revision" />&r2=<xsl:value-of select="prevrevision"/>&diff_format=h</xsl:attribute>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
<xsl:value-of select="name" />
|
|
||||||
</a>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template name="escape-return">
|
|
||||||
<xsl:param name="string"/>
|
|
||||||
<!-- must be a better way to define a carrige return -->
|
|
||||||
<xsl:variable name="return"><xsl:text>
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:variable>
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="contains($string, $return)">
|
|
||||||
<xsl:value-of select="substring-before($string, $return)"/><br/>
|
|
||||||
<xsl:call-template name="escape-return">
|
|
||||||
<xsl:with-param name="string">
|
|
||||||
<xsl:value-of select="substring-after($string, $return)"/>
|
|
||||||
</xsl:with-param>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:value-of select="$string"/>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
||||||
|
|
@ -1,153 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
||||||
<xsl:output indent="yes"/>
|
|
||||||
<xsl:param name="stack">bodyroot</xsl:param>
|
|
||||||
|
|
||||||
<xsl:template match="html|HTML">
|
|
||||||
<xsl:text disable-output-escaping="yes">
|
|
||||||
<![CDATA[ <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "../dtd/document-v10.dtd"> ]]>
|
|
||||||
</xsl:text>
|
|
||||||
<document>
|
|
||||||
<xsl:apply-templates select = "head" />
|
|
||||||
<xsl:apply-templates select="body"/>
|
|
||||||
</document>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="head|HEAD">
|
|
||||||
<header>
|
|
||||||
<title><xsl:value-of select="title" /><xsl:value-of select="TITLE" /></title>
|
|
||||||
<authors>
|
|
||||||
<person id="AO" name="Andrew C. Oliver" email="acoliver2@users.sourceforge.net"/>
|
|
||||||
</authors>
|
|
||||||
</header>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="body|BODY">
|
|
||||||
<body><s1><xsl:attribute name="title"><xsl:value-of select="'pippo'"></xsl:value-of></xsl:attribute>
|
|
||||||
<xsl:apply-templates select="*"/>
|
|
||||||
</s1>
|
|
||||||
</body>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
|
|
||||||
<xsl:template match="meta|META"/>
|
|
||||||
|
|
||||||
<xsl:template match="title|TITLE"/>
|
|
||||||
|
|
||||||
<xsl:template match="h1|H1">
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="h2|H2">
|
|
||||||
<s2><xsl:attribute name="title"><xsl:value-of select="."></xsl:value-of></xsl:attribute></s2>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="h3|H3">
|
|
||||||
<s2><xsl:attribute name="title"><xsl:value-of select="."></xsl:value-of></xsl:attribute></s2>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="h4|H4">
|
|
||||||
<s2><xsl:attribute name="title"><xsl:value-of select="."></xsl:value-of></xsl:attribute></s2>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="dl|DL">
|
|
||||||
<!--<dl>
|
|
||||||
<xsl:apply-templates select = "dd|DD|dt|DT" />
|
|
||||||
</dl>-->
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="dd|DD">
|
|
||||||
<!--<dd>
|
|
||||||
<xsl:apply-templates select = "*" />
|
|
||||||
</dd> -->
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="dt|DT">
|
|
||||||
<!--<dt>
|
|
||||||
<xsl:apply-templates select = "*" />
|
|
||||||
</dt>-->
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="p|P">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="name(parent::node())='li' or name(parent::node())='LI'">
|
|
||||||
<xsl:value-of select = "*" />
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<p>
|
|
||||||
<xsl:value-of select = "*" />
|
|
||||||
</p>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="pre|PRE">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="name(parent::node())='li' or name(parent::node())='LI'">
|
|
||||||
<code>
|
|
||||||
<xsl:value-of disable-output-escaping="no" select="." />
|
|
||||||
</code>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<source>
|
|
||||||
<xsl:value-of disable-output-escaping="no" select="." />
|
|
||||||
</source>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="ul|UL">
|
|
||||||
<ul>
|
|
||||||
<xsl:apply-templates select = "li|LI" />
|
|
||||||
</ul>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="li|LI">
|
|
||||||
<li>
|
|
||||||
<xsl:apply-templates select = "*" />
|
|
||||||
</li>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="ol|OL">
|
|
||||||
<ol>
|
|
||||||
<xsl:apply-templates select = "li|LI" />
|
|
||||||
</ol>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="div|DIV">
|
|
||||||
<xsl:apply-templates select = "*" />
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="br|BR">
|
|
||||||
<br/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="i|I">
|
|
||||||
<em>
|
|
||||||
<xsl:value-of select = "*" />
|
|
||||||
</em>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="b|B">
|
|
||||||
<strong>
|
|
||||||
<xsl:value-of select = "*" />
|
|
||||||
</strong>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="u|U">
|
|
||||||
<em>
|
|
||||||
<xsl:value-of select = "*" />
|
|
||||||
</em>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="a|A">
|
|
||||||
<link><xsl:attribute name="href"><xsl:value-of select="@href" /><xsl:value-of select="@HREF" /></xsl:attribute>
|
|
||||||
<xsl:value-of select = "." />
|
|
||||||
</link>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="img|IMG">
|
|
||||||
<img><xsl:attribute name="src"><xsl:value-of select="@src" /></xsl:attribute></img>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
@ -1,68 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<xsl:stylesheet version="1.0"
|
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
||||||
|
|
||||||
<!-- @author <a href="mailto:barozzi@nicolaken.com">Nicola Ken Barozzi</a> -->
|
|
||||||
|
|
||||||
<xsl:output method="text"/>
|
|
||||||
|
|
||||||
<xsl:template match="/">-----------------------------------------------------------
|
|
||||||
This mail is generated automatically using
|
|
||||||
Jakarta Ant. Contents are automatically
|
|
||||||
downloaded from Apache's Bugzilla.
|
|
||||||
-----------------------------------------------------------
|
|
||||||
Please do not reply to this mail.
|
|
||||||
-----------------------------------------------------------
|
|
||||||
|
|
||||||
***********************************************************
|
|
||||||
COCOON PATCH QUEUE UPDATE
|
|
||||||
|
|
||||||
patches in queue: <xsl:value-of select="count(patch-queue/bug)"/>
|
|
||||||
***********************************************************
|
|
||||||
|
|
||||||
<xsl:for-each select="patch-queue/bug">
|
|
||||||
-----------------------------------------------------------
|
|
||||||
<xsl:value-of select="@id"/>:<xsl:value-of select="@summary"/>
|
|
||||||
-----------------------------------------------------------
|
|
||||||
<xsl:value-of select="@url"/>
|
|
||||||
|
|
||||||
REVIEWER: <xsl:value-of select="@owner"/>
|
|
||||||
RESOLUTION: <xsl:value-of select="@resolution"/>
|
|
||||||
STATUS: <xsl:value-of select="@status"/>
|
|
||||||
|
|
||||||
</xsl:for-each>
|
|
||||||
|
|
||||||
*************************that's it!************************
|
|
||||||
|
|
||||||
------------------------patch HOWTO------------------------
|
|
||||||
|
|
||||||
Send patches to http://nagoya.apache.org/bugzilla/
|
|
||||||
specifying [PATCH] in the summary.
|
|
||||||
Bugzilla sends a mail automatically to this list.
|
|
||||||
Reviewers will mark it FIXED there when applied.
|
|
||||||
Patches not sent to Bugzilla will not be reviewed.
|
|
||||||
-----------------------------------------------------------
|
|
||||||
This file is generated and updated automatically at least
|
|
||||||
once a week, and the data is taken from Bugzilla.
|
|
||||||
If you don't find the patch you submitted to bugzilla
|
|
||||||
after one week, please notify cocoon-dev@xml.apache.org
|
|
||||||
for assistance.
|
|
||||||
-----------------------------------------------------------
|
|
||||||
There is usually a HEAD branch and a previous-version
|
|
||||||
branch that are maintained. Where will the patch go?
|
|
||||||
1. If it is a bug fix it should go to both branches
|
|
||||||
2. If something is totally new it goes into HEAD scratchpad.
|
|
||||||
3. Something in between, but does not break backward
|
|
||||||
compatibility _may_ go into both (and may not)
|
|
||||||
4. For everything else, a vote is required so
|
|
||||||
first it may go into HEAD, and then be VOTEd in order
|
|
||||||
to sync this into branch.
|
|
||||||
Please note that structural changes have to be VOTEd first.
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="@*|*|text()|processing-instruction()">
|
|
||||||
<xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
@ -1,111 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<xsl:stylesheet version="1.0"
|
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
||||||
|
|
||||||
<!-- @author <a href="mailto:barozzi@nicolaken.com">Nicola Ken Barozzi</a> -->
|
|
||||||
|
|
||||||
<xsl:template match="/">
|
|
||||||
|
|
||||||
<xsl:text disable-output-escaping="yes">
|
|
||||||
<![CDATA[
|
|
||||||
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN"
|
|
||||||
"dtd/document-v10.dtd">
|
|
||||||
]]>
|
|
||||||
<!-- this file is automatically generated by build patchqueue-xdocs -->
|
|
||||||
</xsl:text>
|
|
||||||
|
|
||||||
<document>
|
|
||||||
<header>
|
|
||||||
<title>Patch Queue</title>
|
|
||||||
<authors>
|
|
||||||
<person name="Robin Green" email="greenrd@hotmail.com"/>
|
|
||||||
<person name="Nicola Ken Barozzi" email="barozzi@nicolaken.com"/>
|
|
||||||
</authors>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<s1 title="Introduction">
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This is an <strong>informal</strong> list - in chronological order -
|
|
||||||
of some of the noteworthy patches that have been posted
|
|
||||||
to the <link href="mailto:cocoon-dev@xml.apache.org">cocoon-dev</link> mailing list.
|
|
||||||
These patches are not (yet) part of the Apache Cocoon project, but need reviewing for possible
|
|
||||||
inclusion. This system was instituted because, due to the large volume of mail and
|
|
||||||
the lack of time of the committers, some patches tended to get forgotten about. This
|
|
||||||
queue does not guarantee that any patch will be reviewed within a reasonable time frame,
|
|
||||||
but it does at least make them easier to find!
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p><strong>Reviewers wanted!</strong> - If you have time to review and/or test these patches,
|
|
||||||
we would be grateful for your time. Please post comments to the cocoon-dev mailing lists.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Before submitting a patch, please read the page on <connect href="contrib.xml">Third-Party
|
|
||||||
Contributions</connect>. The preferred submission method for patches is:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Post to cocoon-dev@xml.apache.org</li>
|
|
||||||
<li>Describe the patch, the reason for it and (if necessary) why this is important.</li>
|
|
||||||
<li>Generate the patch in <code>diff -u</code> format from CVS</li>
|
|
||||||
<li>Also generate a documentation patch or new file, if this is something that should be documented.
|
|
||||||
</li>
|
|
||||||
<li>Post as an attachment rather than inline (unless it is trivially small).</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>Following the above guidelines will facilitate your patch being reviewed
|
|
||||||
and applied efficiently.</p>
|
|
||||||
|
|
||||||
</s1>
|
|
||||||
|
|
||||||
<s1 title="Patch Queue">
|
|
||||||
|
|
||||||
<p><strong> [Under Construction] </strong> Archive links will be added later.
|
|
||||||
<strong>Please do not bother the patch submitters/authors</strong> without first reading the
|
|
||||||
relevant post(s) in the <connect href="mail-archives.xml">mailing list archives.</connect>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>Vapourware will not be listed.</p>
|
|
||||||
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th>id<!--and Link--></th>
|
|
||||||
<th>Summary</th>
|
|
||||||
<th>Reviewer</th>
|
|
||||||
<th>Resolution</th>
|
|
||||||
<th>Status</th>
|
|
||||||
</tr>
|
|
||||||
<xsl:for-each select="patch-queue/bug">
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
<connect>
|
|
||||||
<xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
|
|
||||||
<xsl:value-of select="@id"/>
|
|
||||||
</connect>
|
|
||||||
</th>
|
|
||||||
<th><xsl:value-of select="@summary"/></th>
|
|
||||||
<th><xsl:value-of select="@owner"/></th>
|
|
||||||
<th><xsl:value-of select="@resolution"/></th>
|
|
||||||
<th><xsl:value-of select="@status"/></th>
|
|
||||||
</tr>
|
|
||||||
</xsl:for-each>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p>See also additional list of patches to be added in <connect href="todo.xml">To Do</connect>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</s1>
|
|
||||||
</body>
|
|
||||||
</document>
|
|
||||||
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="@*|*|text()|processing-instruction()">
|
|
||||||
<xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
@ -1,246 +0,0 @@
|
|||||||
|
|
||||||
/* ====================================================================
|
|
||||||
* The Apache Software License, Version 1.1
|
|
||||||
*
|
|
||||||
* Copyright (c) 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 acknowledgment:
|
|
||||||
* "This product includes software developed by the
|
|
||||||
* Apache Software Foundation (http://www.apache.org/)."
|
|
||||||
* Alternately, this acknowledgment may appear in the software itself,
|
|
||||||
* if and wherever such third-party acknowledgments normally appear.
|
|
||||||
*
|
|
||||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
|
||||||
* "Apache POI" must not be used to endorse or promote products
|
|
||||||
* derived from this software without prior written permission. For
|
|
||||||
* written permission, please contact apache@apache.org.
|
|
||||||
*
|
|
||||||
* 5. Products derived from this software may not be called "Apache",
|
|
||||||
* "Apache POI", nor may "Apache" appear in their name, without
|
|
||||||
* prior written permission of the Apache Software Foundation.
|
|
||||||
*
|
|
||||||
* 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/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.io.*;
|
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.zip.*;
|
|
||||||
|
|
||||||
import org.apache.tools.ant.*;
|
|
||||||
import org.apache.tools.ant.taskdefs.*;
|
|
||||||
import org.apache.tools.ant.types.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Will set the given property if the requested class is available in the
|
|
||||||
* specified classpath. The found class is not loaded!
|
|
||||||
* This class is heavily based on the available task in the ant package:
|
|
||||||
* @author Stefano Mazzocchi <a href="mailto:stefano@apache.org">stefano@apache.org</a>
|
|
||||||
*
|
|
||||||
* This task searches only in the defined path but not in the parents path
|
|
||||||
* unless explicitly overridden by the value of ${build.sysclasspath}
|
|
||||||
* like the original available task does.
|
|
||||||
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
|
|
||||||
* @version CVS $Revision$ $Date$
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class ClassAvailable
|
|
||||||
extends Task
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A hashtable of zip files opened by the classloader
|
|
||||||
*/
|
|
||||||
|
|
||||||
private Hashtable zipFiles = new Hashtable();
|
|
||||||
private String property;
|
|
||||||
private String classname;
|
|
||||||
private Path classpath;
|
|
||||||
private String value = "true";
|
|
||||||
|
|
||||||
public void setClasspath(Path classpath)
|
|
||||||
{
|
|
||||||
createClasspath().append(classpath);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Path createClasspath()
|
|
||||||
{
|
|
||||||
if (this.classpath == null)
|
|
||||||
{
|
|
||||||
this.classpath = new Path(this.project);
|
|
||||||
}
|
|
||||||
return this.classpath.createPath();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setClasspathRef(Reference r)
|
|
||||||
{
|
|
||||||
createClasspath().setRefid(r);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProperty(String property)
|
|
||||||
{
|
|
||||||
this.property = property;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setValue(String value)
|
|
||||||
{
|
|
||||||
this.value = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setClassname(String classname)
|
|
||||||
{
|
|
||||||
if (!"".equals(classname))
|
|
||||||
{
|
|
||||||
this.classname = classname;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void execute()
|
|
||||||
throws BuildException
|
|
||||||
{
|
|
||||||
if (property == null)
|
|
||||||
{
|
|
||||||
throw new BuildException("property attribute is required",
|
|
||||||
location);
|
|
||||||
}
|
|
||||||
if (eval())
|
|
||||||
{
|
|
||||||
this.project.setProperty(property, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean eval()
|
|
||||||
throws BuildException
|
|
||||||
{
|
|
||||||
if (classname == null)
|
|
||||||
{
|
|
||||||
throw new BuildException(
|
|
||||||
"At least one of (classname|file|resource) is required",
|
|
||||||
location);
|
|
||||||
}
|
|
||||||
if (classpath != null)
|
|
||||||
{
|
|
||||||
classpath.setProject(project);
|
|
||||||
classpath = classpath.concatSystemClasspath("ignore");
|
|
||||||
}
|
|
||||||
if (!findClassInComponents(classname))
|
|
||||||
{
|
|
||||||
log("Unable to load class " + classname + " to set property "
|
|
||||||
+ property, Project.MSG_VERBOSE);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get an inputstream to a given resource in the given file which may
|
|
||||||
* either be a directory or a zip file.
|
|
||||||
*
|
|
||||||
* @param file the file (directory or jar) in which to search for the resource.
|
|
||||||
* @param resourceName the name of the resource for which a stream is required.
|
|
||||||
*
|
|
||||||
* @return a stream to the required resource or null if the resource cannot be
|
|
||||||
* found in the given file object
|
|
||||||
*/
|
|
||||||
|
|
||||||
private boolean contains(File file, String resourceName)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (!file.exists())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (file.isDirectory())
|
|
||||||
{
|
|
||||||
File resource = new File(file, resourceName);
|
|
||||||
|
|
||||||
if (resource.exists())
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
// is the zip file in the cache
|
|
||||||
ZipFile zipFile = ( ZipFile ) zipFiles.get(file);
|
|
||||||
|
|
||||||
if (zipFile == null)
|
|
||||||
{
|
|
||||||
zipFile = new ZipFile(file);
|
|
||||||
zipFiles.put(file, zipFile);
|
|
||||||
}
|
|
||||||
ZipEntry entry = zipFile.getEntry(resourceName);
|
|
||||||
|
|
||||||
if (entry != null)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
log("Ignoring Exception " + e.getClass().getName() + ": "
|
|
||||||
+ e.getMessage() + " reading resource " + resourceName
|
|
||||||
+ " from " + file, Project.MSG_VERBOSE);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Find a class on the given classpath.
|
|
||||||
*/
|
|
||||||
|
|
||||||
private boolean findClassInComponents(String name)
|
|
||||||
{
|
|
||||||
|
|
||||||
// we need to search the components of the path to see if we can find the
|
|
||||||
// class we want.
|
|
||||||
final String classname = name.replace('.', '/') + ".class";
|
|
||||||
final String[] list = classpath.list();
|
|
||||||
boolean found = false;
|
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
while ((i < list.length) && (found == false))
|
|
||||||
{
|
|
||||||
final File pathComponent =
|
|
||||||
( File ) project.resolveFile(list[ i ]);
|
|
||||||
|
|
||||||
found = this.contains(pathComponent, classname);
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
return found;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,272 +0,0 @@
|
|||||||
|
|
||||||
/* ====================================================================
|
|
||||||
* The Apache Software License, Version 1.1
|
|
||||||
*
|
|
||||||
* Copyright (c) 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 acknowledgment:
|
|
||||||
* "This product includes software developed by the
|
|
||||||
* Apache Software Foundation (http://www.apache.org/)."
|
|
||||||
* Alternately, this acknowledgment may appear in the software itself,
|
|
||||||
* if and wherever such third-party acknowledgments normally appear.
|
|
||||||
*
|
|
||||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
|
||||||
* "Apache POI" must not be used to endorse or promote products
|
|
||||||
* derived from this software without prior written permission. For
|
|
||||||
* written permission, please contact apache@apache.org.
|
|
||||||
*
|
|
||||||
* 5. Products derived from this software may not be called "Apache",
|
|
||||||
* "Apache POI", nor may "Apache" appear in their name, without
|
|
||||||
* prior written permission of the Apache Software Foundation.
|
|
||||||
*
|
|
||||||
* 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/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.BufferedInputStream;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.io.FileOutputStream;
|
|
||||||
import java.io.Writer;
|
|
||||||
import java.io.PrintWriter;
|
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.BufferedWriter;
|
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import org.w3c.dom.NodeList;
|
|
||||||
import org.w3c.dom.Node;
|
|
||||||
import org.w3c.dom.Element;
|
|
||||||
import org.w3c.dom.Attr;
|
|
||||||
import org.w3c.dom.Document;
|
|
||||||
import org.w3c.dom.NamedNodeMap;
|
|
||||||
import org.w3c.tidy.Tidy;
|
|
||||||
|
|
||||||
import org.apache.tools.ant.BuildException;
|
|
||||||
import org.apache.tools.ant.taskdefs.Property;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Task to ask property values to the user. Uses current value as default.
|
|
||||||
*
|
|
||||||
* @author <a href="mailto:barozzi@nicolaken.com">Nicola Ken Barozzi</a>
|
|
||||||
* @created 14 January 2002
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class JTidyTask
|
|
||||||
extends org.apache.tools.ant.Task
|
|
||||||
{
|
|
||||||
private String src;
|
|
||||||
private String dest;
|
|
||||||
private String log;
|
|
||||||
private Tidy tidy;
|
|
||||||
private String warn = "false";
|
|
||||||
private String summary = "false";
|
|
||||||
PrintWriter pw;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public JTidyTask()
|
|
||||||
{
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initializes the task.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public void init()
|
|
||||||
{
|
|
||||||
super.init();
|
|
||||||
|
|
||||||
// Setup an instance of Tidy.
|
|
||||||
tidy = new Tidy();
|
|
||||||
tidy.setXmlOut(true);
|
|
||||||
tidy.setXHTML(true);
|
|
||||||
tidy.setDropFontTags(true);
|
|
||||||
tidy.setLiteralAttribs(true);
|
|
||||||
tidy.setMakeClean(true);
|
|
||||||
tidy.setShowWarnings(Boolean.getBoolean(warn));
|
|
||||||
tidy.setQuiet(!Boolean.getBoolean(summary));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Run the task.
|
|
||||||
* @exception org.apache.tools.ant.BuildException The exception raised during task execution.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public void execute()
|
|
||||||
throws org.apache.tools.ant.BuildException
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
PrintWriter pw = new PrintWriter(new FileWriter(log));
|
|
||||||
|
|
||||||
tidy.setErrout(pw);
|
|
||||||
|
|
||||||
// Extract the document using JTidy and stream it.
|
|
||||||
BufferedInputStream in =
|
|
||||||
new BufferedInputStream(new FileInputStream(src));
|
|
||||||
|
|
||||||
// FileOutputStream out = new FileOutputStream(dest);
|
|
||||||
PrintWriter out =
|
|
||||||
new PrintWriter(new FileWriter(dest));
|
|
||||||
|
|
||||||
// using null as output to get dom so to remove duplicate attributes
|
|
||||||
org.w3c.dom.Document domDoc = tidy.parseDOM(in, null);
|
|
||||||
|
|
||||||
domDoc.normalize();
|
|
||||||
stripDuplicateAttributes(domDoc, null);
|
|
||||||
org.apache.xml.serialize.OutputFormat format =
|
|
||||||
new org.apache.xml.serialize.OutputFormat();
|
|
||||||
|
|
||||||
format.setIndenting(true);
|
|
||||||
format.setEncoding("ISO-8859-1");
|
|
||||||
format.setPreserveSpace(true);
|
|
||||||
format.setLineSeparator("\n");
|
|
||||||
org.apache.xml.serialize.XMLSerializer serializer =
|
|
||||||
new org.apache.xml.serialize.XMLSerializer(out, format);
|
|
||||||
|
|
||||||
serializer.serialize(domDoc);
|
|
||||||
out.flush();
|
|
||||||
out.close();
|
|
||||||
in.close();
|
|
||||||
pw.flush();
|
|
||||||
pw.close();
|
|
||||||
}
|
|
||||||
catch (IOException ioe)
|
|
||||||
{
|
|
||||||
throw new BuildException(ioe);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSrc(String src)
|
|
||||||
{
|
|
||||||
this.src = src;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDest(String dest)
|
|
||||||
{
|
|
||||||
this.dest = dest;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLog(String log)
|
|
||||||
{
|
|
||||||
this.log = log;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setWarn(String warn)
|
|
||||||
{
|
|
||||||
this.warn = warn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSummary(String summary)
|
|
||||||
{
|
|
||||||
this.summary = summary;
|
|
||||||
}
|
|
||||||
|
|
||||||
// using parent because jtidy dom is bugged, cannot get parent or delete child
|
|
||||||
public static void stripDuplicateAttributes(Node node, Node parent)
|
|
||||||
{
|
|
||||||
|
|
||||||
// The output depends on the type of the node
|
|
||||||
switch (node.getNodeType())
|
|
||||||
{
|
|
||||||
|
|
||||||
case Node.DOCUMENT_NODE :
|
|
||||||
{
|
|
||||||
Document doc = ( Document ) node;
|
|
||||||
Node child = doc.getFirstChild();
|
|
||||||
|
|
||||||
while (child != null)
|
|
||||||
{
|
|
||||||
stripDuplicateAttributes(child, node);
|
|
||||||
child = child.getNextSibling();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case Node.ELEMENT_NODE :
|
|
||||||
{
|
|
||||||
Element elt = ( Element ) node;
|
|
||||||
NamedNodeMap attrs = elt.getAttributes();
|
|
||||||
ArrayList nodesToRemove = new ArrayList();
|
|
||||||
int nodesToRemoveNum = 0;
|
|
||||||
|
|
||||||
for (int i = 0; i < attrs.getLength(); i++)
|
|
||||||
{
|
|
||||||
Node a = attrs.item(i);
|
|
||||||
|
|
||||||
for (int j = 0; j < attrs.getLength(); j++)
|
|
||||||
{
|
|
||||||
Node b = attrs.item(j);
|
|
||||||
|
|
||||||
// if there are two attributes with same name
|
|
||||||
if ((i != j)
|
|
||||||
&& (a.getNodeName().equals(b.getNodeName())))
|
|
||||||
{
|
|
||||||
nodesToRemove.add(b);
|
|
||||||
nodesToRemoveNum++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (int i = 0; i < nodesToRemoveNum; i++)
|
|
||||||
{
|
|
||||||
org.w3c.dom.Attr nodeToDelete =
|
|
||||||
( org.w3c.dom.Attr ) nodesToRemove.get(i);
|
|
||||||
org.w3c.dom.Element nodeToDeleteParent =
|
|
||||||
( org.w3c.dom
|
|
||||||
.Element ) node; // nodeToDelete.getParentNode();
|
|
||||||
|
|
||||||
nodeToDeleteParent.removeAttributeNode(nodeToDelete);
|
|
||||||
}
|
|
||||||
nodesToRemove.clear();
|
|
||||||
Node child = elt.getFirstChild();
|
|
||||||
|
|
||||||
while (child != null)
|
|
||||||
{
|
|
||||||
stripDuplicateAttributes(child, node);
|
|
||||||
child = child.getNextSibling();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default :
|
|
||||||
|
|
||||||
// do nothing
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,363 +0,0 @@
|
|||||||
|
|
||||||
/* ====================================================================
|
|
||||||
* The Apache Software License, Version 1.1
|
|
||||||
*
|
|
||||||
* Copyright (c) 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 acknowledgment:
|
|
||||||
* "This product includes software developed by the
|
|
||||||
* Apache Software Foundation (http://www.apache.org/)."
|
|
||||||
* Alternately, this acknowledgment may appear in the software itself,
|
|
||||||
* if and wherever such third-party acknowledgments normally appear.
|
|
||||||
*
|
|
||||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
|
||||||
* "Apache POI" must not be used to endorse or promote products
|
|
||||||
* derived from this software without prior written permission. For
|
|
||||||
* written permission, please contact apache@apache.org.
|
|
||||||
*
|
|
||||||
* 5. Products derived from this software may not be called "Apache",
|
|
||||||
* "Apache POI", nor may "Apache" appear in their name, without
|
|
||||||
* prior written permission of the Apache Software Foundation.
|
|
||||||
*
|
|
||||||
* 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/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.io.*;
|
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import org.apache.tools.ant.*;
|
|
||||||
import org.apache.tools.ant.taskdefs.*;
|
|
||||||
import org.apache.tools.ant.types.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add components to the sitemap
|
|
||||||
*
|
|
||||||
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
|
|
||||||
* @version CVS $Revision$ $Date$
|
|
||||||
*/
|
|
||||||
|
|
||||||
public final class SitemapTool
|
|
||||||
extends Task
|
|
||||||
{
|
|
||||||
private String sitemap;
|
|
||||||
private String directory;
|
|
||||||
private String extension;
|
|
||||||
|
|
||||||
public void setSitemap(String sitemap)
|
|
||||||
{
|
|
||||||
this.sitemap = sitemap;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDirectory(String directory)
|
|
||||||
{
|
|
||||||
this.directory = directory;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setExtension(String extension)
|
|
||||||
{
|
|
||||||
this.extension = extension;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void execute()
|
|
||||||
throws BuildException
|
|
||||||
{
|
|
||||||
if (this.sitemap == null)
|
|
||||||
{
|
|
||||||
throw new BuildException("sitemap attribute is required",
|
|
||||||
location);
|
|
||||||
}
|
|
||||||
if (this.extension == null)
|
|
||||||
{
|
|
||||||
throw new BuildException("extension attribute is required",
|
|
||||||
location);
|
|
||||||
}
|
|
||||||
if (this.directory == null)
|
|
||||||
{
|
|
||||||
throw new BuildException("directory attribute is required",
|
|
||||||
location);
|
|
||||||
}
|
|
||||||
try
|
|
||||||
{
|
|
||||||
|
|
||||||
// process recursive
|
|
||||||
this.process(new File(this.directory), this.extension,
|
|
||||||
this.sitemap);
|
|
||||||
}
|
|
||||||
catch (IOException ioe)
|
|
||||||
{
|
|
||||||
throw new BuildException("IOException: " + ioe);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Scan recursive
|
|
||||||
*/
|
|
||||||
|
|
||||||
private void process(final File directoryFile, final String ext,
|
|
||||||
final String sitemapLocation)
|
|
||||||
throws IOException, BuildException
|
|
||||||
{
|
|
||||||
final File[] files = directoryFile.listFiles();
|
|
||||||
|
|
||||||
for (int i = 0; i < files.length; i++)
|
|
||||||
{
|
|
||||||
if (files[ i ].isDirectory() == true)
|
|
||||||
{
|
|
||||||
this.process(files[ i ], ext, sitemapLocation);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (files[ i ].getName().endsWith("." + ext) == true)
|
|
||||||
{
|
|
||||||
System.out.println("Reading: "
|
|
||||||
+ files[ i ].getAbsolutePath());
|
|
||||||
final String data =
|
|
||||||
this.load(files[ i ].getAbsolutePath());
|
|
||||||
|
|
||||||
// separate the data by lines
|
|
||||||
final StringTokenizer st = new StringTokenizer(data);
|
|
||||||
|
|
||||||
while (st.hasMoreElements() == true)
|
|
||||||
{
|
|
||||||
|
|
||||||
// now get the properties of a line. These are separated by a "|"
|
|
||||||
final String line =
|
|
||||||
( String ) st.nextElement();
|
|
||||||
final StringTokenizer prop =
|
|
||||||
new StringTokenizer(line, "|");
|
|
||||||
String category = null;
|
|
||||||
String componentName = null;
|
|
||||||
String className = null;
|
|
||||||
String configuration = null;
|
|
||||||
String label = null;
|
|
||||||
String mimeType = null;
|
|
||||||
|
|
||||||
while (prop.hasMoreElements() == true)
|
|
||||||
{
|
|
||||||
final String property =
|
|
||||||
( String ) prop.nextElement();
|
|
||||||
final int pos = property.indexOf(":");
|
|
||||||
final String propName =
|
|
||||||
property.substring(0, pos);
|
|
||||||
final String propVal = property.substring(pos
|
|
||||||
+ 1);
|
|
||||||
|
|
||||||
if (propName.equals("category"))
|
|
||||||
{
|
|
||||||
category = propVal;
|
|
||||||
}
|
|
||||||
else if (propName.equals("componentName"))
|
|
||||||
{
|
|
||||||
componentName = propVal;
|
|
||||||
}
|
|
||||||
else if (propName.equals("componentClass"))
|
|
||||||
{
|
|
||||||
className = propVal;
|
|
||||||
}
|
|
||||||
else if (propName.equals("configuration"))
|
|
||||||
{
|
|
||||||
configuration = propVal;
|
|
||||||
}
|
|
||||||
else if (propName.equals("label"))
|
|
||||||
{
|
|
||||||
label = propVal;
|
|
||||||
}
|
|
||||||
else if (propName.equals("mimeType"))
|
|
||||||
{
|
|
||||||
mimeType = propVal;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new BuildException(
|
|
||||||
"Unknown property " + propName
|
|
||||||
+ " in file "
|
|
||||||
+ files[ i ].getAbsolutePath());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Test for required values
|
|
||||||
if (category == null)
|
|
||||||
{
|
|
||||||
throw new BuildException(
|
|
||||||
"category property is required in file "
|
|
||||||
+ files[ i ].getAbsolutePath(), location);
|
|
||||||
}
|
|
||||||
if (componentName == null)
|
|
||||||
{
|
|
||||||
throw new BuildException(
|
|
||||||
"componentName property is required in file "
|
|
||||||
+ files[ i ].getAbsolutePath(), location);
|
|
||||||
}
|
|
||||||
if (className == null)
|
|
||||||
{
|
|
||||||
throw new BuildException(
|
|
||||||
"componentClass property is required in file "
|
|
||||||
+ files[ i ].getAbsolutePath(), location);
|
|
||||||
}
|
|
||||||
this.add(sitemapLocation, category, componentName,
|
|
||||||
className, configuration, label, mimeType);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add entry to sitemap
|
|
||||||
*/
|
|
||||||
|
|
||||||
private void add(final String sitemapLocation, final String category,
|
|
||||||
final String componentName, final String className,
|
|
||||||
final String configuration, final String label,
|
|
||||||
final String mimeType)
|
|
||||||
throws IOException
|
|
||||||
{
|
|
||||||
final String data = load(sitemapLocation);
|
|
||||||
final String searchString =
|
|
||||||
new StringBuffer("</map:").append(category).append(">")
|
|
||||||
.toString();
|
|
||||||
final int pos = data.indexOf(searchString);
|
|
||||||
int categoryStartPos =
|
|
||||||
data
|
|
||||||
.indexOf(new StringBuffer("<map:").append(category).append(">")
|
|
||||||
.toString());
|
|
||||||
|
|
||||||
if (categoryStartPos == -1)
|
|
||||||
{
|
|
||||||
categoryStartPos =
|
|
||||||
data
|
|
||||||
.indexOf(new StringBuffer("<map:").append(category)
|
|
||||||
.append(" ").toString());
|
|
||||||
}
|
|
||||||
if ((categoryStartPos != -1) && (categoryStartPos < pos)
|
|
||||||
&& (pos != -1))
|
|
||||||
{
|
|
||||||
|
|
||||||
// the category exists, now search if a component
|
|
||||||
// with the name already exists
|
|
||||||
int componentPos =
|
|
||||||
data.substring(categoryStartPos, pos)
|
|
||||||
.indexOf(new StringBuffer("name=\"").append(componentName)
|
|
||||||
.append("\"").toString());
|
|
||||||
|
|
||||||
if (componentPos == -1)
|
|
||||||
{
|
|
||||||
StringBuffer buffer =
|
|
||||||
new StringBuffer(data.substring(0, pos)).append("<map:")
|
|
||||||
.append(category.substring(0, category.length() - 1))
|
|
||||||
.append(" name=\"").append(componentName)
|
|
||||||
.append("\" src=\"").append(className).append("\"")
|
|
||||||
.append(" logger=\"sitemap.")
|
|
||||||
.append(category.substring(0, category.length() - 1))
|
|
||||||
.append('.').append(componentName).append('\"');
|
|
||||||
|
|
||||||
if ((null != mimeType) && (mimeType.length() > 0))
|
|
||||||
{
|
|
||||||
buffer.append(" mime-type=\"").append(mimeType)
|
|
||||||
.append("\"");
|
|
||||||
}
|
|
||||||
if ((null != label) && (label.length() > 0))
|
|
||||||
{
|
|
||||||
buffer.append(" label=\"").append(label).append("\"");
|
|
||||||
}
|
|
||||||
if (null != configuration)
|
|
||||||
{
|
|
||||||
buffer.append(">\n").append(configuration).append("\n")
|
|
||||||
.append("</map:")
|
|
||||||
.append(category.substring(0, category.length() - 1))
|
|
||||||
.append(">\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
buffer.append("/>\n");
|
|
||||||
}
|
|
||||||
buffer.append(data.substring(pos)).toString();
|
|
||||||
this.save(sitemapLocation, buffer.toString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Load a file and return the content as a string.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public String load(String filename)
|
|
||||||
throws IOException
|
|
||||||
{
|
|
||||||
FileInputStream fis;
|
|
||||||
|
|
||||||
fis = new FileInputStream(filename);
|
|
||||||
int available;
|
|
||||||
byte[] data = null;
|
|
||||||
byte[] tempData;
|
|
||||||
byte[] copyData;
|
|
||||||
|
|
||||||
do
|
|
||||||
{
|
|
||||||
available = 1024;
|
|
||||||
tempData = new byte[ available ];
|
|
||||||
available = fis.read(tempData, 0, available);
|
|
||||||
if (available > 0)
|
|
||||||
{
|
|
||||||
copyData = new byte[ ((data == null) ? 0
|
|
||||||
: data.length) + available ];
|
|
||||||
if (data != null)
|
|
||||||
{
|
|
||||||
System.arraycopy(data, 0, copyData, 0, data.length);
|
|
||||||
}
|
|
||||||
System.arraycopy(tempData, 0, copyData, ((data == null) ? 0
|
|
||||||
: data.length), available);
|
|
||||||
data = copyData;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
while (available > 0);
|
|
||||||
fis.close();
|
|
||||||
return ((data != null) ? new String(data)
|
|
||||||
: "");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Save the string to a file
|
|
||||||
*/
|
|
||||||
|
|
||||||
public void save(String filename, String data)
|
|
||||||
throws IOException
|
|
||||||
{
|
|
||||||
FileWriter fw = new FileWriter(filename);
|
|
||||||
|
|
||||||
fw.write(data);
|
|
||||||
fw.close();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,149 +0,0 @@
|
|||||||
|
|
||||||
/* ====================================================================
|
|
||||||
* The Apache Software License, Version 1.1
|
|
||||||
*
|
|
||||||
* Copyright (c) 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 acknowledgment:
|
|
||||||
* "This product includes software developed by the
|
|
||||||
* Apache Software Foundation (http://www.apache.org/)."
|
|
||||||
* Alternately, this acknowledgment may appear in the software itself,
|
|
||||||
* if and wherever such third-party acknowledgments normally appear.
|
|
||||||
*
|
|
||||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
|
||||||
* "Apache POI" must not be used to endorse or promote products
|
|
||||||
* derived from this software without prior written permission. For
|
|
||||||
* written permission, please contact apache@apache.org.
|
|
||||||
*
|
|
||||||
* 5. Products derived from this software may not be called "Apache",
|
|
||||||
* "Apache POI", nor may "Apache" appear in their name, without
|
|
||||||
* prior written permission of the Apache Software Foundation.
|
|
||||||
*
|
|
||||||
* 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/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Task to ask property values to the user. Uses current value as default.
|
|
||||||
*
|
|
||||||
* @author <a href="mailto:barozzi@nicolaken.com">Nicola Ken Barozzi</a>
|
|
||||||
* @created 14 January 2002
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class UserInput
|
|
||||||
extends org.apache.tools.ant.Task
|
|
||||||
{
|
|
||||||
private String question;
|
|
||||||
private String name;
|
|
||||||
private String value;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public UserInput()
|
|
||||||
{
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initializes the task.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public void init()
|
|
||||||
{
|
|
||||||
super.init();
|
|
||||||
question = "?";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Run the task.
|
|
||||||
* @exception org.apache.tools.ant.BuildException The exception raised during task execution.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public void execute()
|
|
||||||
throws org.apache.tools.ant.BuildException
|
|
||||||
{
|
|
||||||
value = project.getProperty(name);
|
|
||||||
String defaultvalue = value;
|
|
||||||
|
|
||||||
// if the property exists
|
|
||||||
if (value != null)
|
|
||||||
{
|
|
||||||
System.out.println("\n" + question + " [" + value + "] ");
|
|
||||||
BufferedReader reader =
|
|
||||||
new BufferedReader(new InputStreamReader(System.in));
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
value = reader.readLine();
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
value = defaultvalue;
|
|
||||||
}
|
|
||||||
if (!value.equals(""))
|
|
||||||
{
|
|
||||||
project.setProperty(name, value);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
project.setProperty(name, defaultvalue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the prompt text that will be presented to the user.
|
|
||||||
* @param question prompt string
|
|
||||||
*/
|
|
||||||
|
|
||||||
public void addText(String question)
|
|
||||||
{
|
|
||||||
this.question = question;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setQuestion(String question)
|
|
||||||
{
|
|
||||||
this.question = question;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name)
|
|
||||||
{
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,238 +0,0 @@
|
|||||||
|
|
||||||
/* ====================================================================
|
|
||||||
* The Apache Software License, Version 1.1
|
|
||||||
*
|
|
||||||
* Copyright (c) 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 acknowledgment:
|
|
||||||
* "This product includes software developed by the
|
|
||||||
* Apache Software Foundation (http://www.apache.org/)."
|
|
||||||
* Alternately, this acknowledgment may appear in the software itself,
|
|
||||||
* if and wherever such third-party acknowledgments normally appear.
|
|
||||||
*
|
|
||||||
* 4. The names "Apache" and "Apache Software Foundation" and
|
|
||||||
* "Apache POI" must not be used to endorse or promote products
|
|
||||||
* derived from this software without prior written permission. For
|
|
||||||
* written permission, please contact apache@apache.org.
|
|
||||||
*
|
|
||||||
* 5. Products derived from this software may not be called "Apache",
|
|
||||||
* "Apache POI", nor may "Apache" appear in their name, without
|
|
||||||
* prior written permission of the Apache Software Foundation.
|
|
||||||
*
|
|
||||||
* 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/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import java.io.*;
|
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import org.apache.tools.ant.*;
|
|
||||||
import org.apache.tools.ant.taskdefs.*;
|
|
||||||
import org.apache.tools.ant.types.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add components to the cocoon.xconf
|
|
||||||
* This is only a ugly first shot
|
|
||||||
*
|
|
||||||
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
|
|
||||||
* @version CVS $Revision$ $Date$
|
|
||||||
*/
|
|
||||||
|
|
||||||
public final class XConfTool
|
|
||||||
extends Task
|
|
||||||
{
|
|
||||||
private String configuration;
|
|
||||||
private String directory;
|
|
||||||
private String extension;
|
|
||||||
|
|
||||||
public void setConfiguration(String configuration)
|
|
||||||
{
|
|
||||||
this.configuration = configuration;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDirectory(String directory)
|
|
||||||
{
|
|
||||||
this.directory = directory;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setExtension(String extension)
|
|
||||||
{
|
|
||||||
this.extension = extension;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void execute()
|
|
||||||
throws BuildException
|
|
||||||
{
|
|
||||||
if (this.configuration == null)
|
|
||||||
{
|
|
||||||
throw new BuildException("configuration attribute is required",
|
|
||||||
location);
|
|
||||||
}
|
|
||||||
if (this.extension == null)
|
|
||||||
{
|
|
||||||
throw new BuildException("extension attribute is required",
|
|
||||||
location);
|
|
||||||
}
|
|
||||||
if (this.directory == null)
|
|
||||||
{
|
|
||||||
throw new BuildException("directory attribute is required",
|
|
||||||
location);
|
|
||||||
}
|
|
||||||
try
|
|
||||||
{
|
|
||||||
|
|
||||||
// process recursive
|
|
||||||
this.process(new File(this.directory), this.extension,
|
|
||||||
this.configuration);
|
|
||||||
}
|
|
||||||
catch (IOException ioe)
|
|
||||||
{
|
|
||||||
throw new BuildException("IOException: " + ioe);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Scan recursive
|
|
||||||
*/
|
|
||||||
|
|
||||||
private void process(final File directoryFile, final String ext,
|
|
||||||
final String configurationLocation)
|
|
||||||
throws IOException, BuildException
|
|
||||||
{
|
|
||||||
final File[] files = directoryFile.listFiles();
|
|
||||||
|
|
||||||
for (int i = 0; i < files.length; i++)
|
|
||||||
{
|
|
||||||
if (files[ i ].isDirectory() == true)
|
|
||||||
{
|
|
||||||
this.process(files[ i ], ext, configurationLocation);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (files[ i ].getName().endsWith("." + ext) == true)
|
|
||||||
{
|
|
||||||
System.out.println("Reading: "
|
|
||||||
+ files[ i ].getAbsolutePath());
|
|
||||||
final String newComponent =
|
|
||||||
this.load(files[ i ].getAbsolutePath());
|
|
||||||
|
|
||||||
this.add(configurationLocation, newComponent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add entry to sitemap
|
|
||||||
*/
|
|
||||||
|
|
||||||
private void add(final String configurationLocation,
|
|
||||||
final String newComponent)
|
|
||||||
throws IOException
|
|
||||||
{
|
|
||||||
final String data = load(configurationLocation);
|
|
||||||
|
|
||||||
// first search if component already present:
|
|
||||||
if (data.indexOf(newComponent) == -1)
|
|
||||||
{
|
|
||||||
int pos = data.indexOf("<cocoon");
|
|
||||||
|
|
||||||
if (pos != -1)
|
|
||||||
{
|
|
||||||
pos = data.indexOf(">", pos);
|
|
||||||
if (pos != -1)
|
|
||||||
{
|
|
||||||
StringBuffer buffer =
|
|
||||||
new StringBuffer(data.substring(0, pos + 1))
|
|
||||||
.append("\n\n").append(newComponent)
|
|
||||||
.append(data.substring(pos + 1));
|
|
||||||
|
|
||||||
this.save(configurationLocation, buffer.toString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Load a file and return the content as a string.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public String load(String filename)
|
|
||||||
throws IOException
|
|
||||||
{
|
|
||||||
FileInputStream fis;
|
|
||||||
|
|
||||||
fis = new FileInputStream(filename);
|
|
||||||
int available;
|
|
||||||
byte[] data = null;
|
|
||||||
byte[] tempData;
|
|
||||||
byte[] copyData;
|
|
||||||
|
|
||||||
do
|
|
||||||
{
|
|
||||||
available = 1024;
|
|
||||||
tempData = new byte[ available ];
|
|
||||||
available = fis.read(tempData, 0, available);
|
|
||||||
if (available > 0)
|
|
||||||
{
|
|
||||||
copyData = new byte[ ((data == null) ? 0
|
|
||||||
: data.length) + available ];
|
|
||||||
if (data != null)
|
|
||||||
{
|
|
||||||
System.arraycopy(data, 0, copyData, 0, data.length);
|
|
||||||
}
|
|
||||||
System.arraycopy(tempData, 0, copyData, ((data == null) ? 0
|
|
||||||
: data.length), available);
|
|
||||||
data = copyData;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
while (available > 0);
|
|
||||||
fis.close();
|
|
||||||
return ((data != null) ? new String(data)
|
|
||||||
: "");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Save the string to a file
|
|
||||||
*/
|
|
||||||
|
|
||||||
public void save(String filename, String data)
|
|
||||||
throws IOException
|
|
||||||
{
|
|
||||||
FileWriter fw = new FileWriter(filename);
|
|
||||||
|
|
||||||
fw.write(data);
|
|
||||||
fw.close();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,78 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
||||||
|
|
||||||
<xsl:output method="html" indent="yes"/>
|
|
||||||
|
|
||||||
<xsl:template match="changes">
|
|
||||||
<xsl:variable name="version" select="@version"/>
|
|
||||||
<xsl:apply-templates select="document(@file,/)/changes/release[attribute::version=string($version)]"/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="announcement">
|
|
||||||
<style>
|
|
||||||
body { background-color: #FFFFFF }
|
|
||||||
p { font-size: 10pt; font-family: Helvetica, Arial, sans-serif }
|
|
||||||
li,ul { font-size: 10pt; font-family: Helvetica, Arial, sans-serif }
|
|
||||||
div { font-size: 10pt; font-family: Helvetica, Arial, sans-serif; font-style:italic }
|
|
||||||
h1 { font-size: 14pt; font-family: Helvetica, Arial, sans-serif; font-weight: bold }
|
|
||||||
h2 { font-size: 12pt; font-family: Helvetica, Arial, sans-serif; font-weight: bold }
|
|
||||||
h3 { font-size: 10pt; font-family: Helvetica, Arial, sans-serif; font-weight: bold }
|
|
||||||
A:link { color: #0000A0 } /* unvisited link */
|
|
||||||
A:visited { color: #A00000 } /* visited links */
|
|
||||||
A:active { color: #00A000 } /* active links */
|
|
||||||
</style>
|
|
||||||
<h1 align="center"><xsl:value-of select="title"/><xsl:text> Released</xsl:text></h1>
|
|
||||||
<xsl:apply-templates select="abstract"/>
|
|
||||||
|
|
||||||
<xsl:for-each select="project">
|
|
||||||
<h2>About <xsl:value-of select="title"/></h2>
|
|
||||||
<xsl:apply-templates select="."/>
|
|
||||||
</xsl:for-each>
|
|
||||||
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="project">
|
|
||||||
<p><xsl:apply-templates select="description"/></p>
|
|
||||||
|
|
||||||
<p>For more information about <xsl:value-of select="title"/>, please go to
|
|
||||||
<a><xsl:attribute name="href"><xsl:value-of select="@site"/></xsl:attribute>
|
|
||||||
<xsl:value-of select="@site"/></a>.</p>
|
|
||||||
|
|
||||||
<!-- print out ChangeLog if present -->
|
|
||||||
<!--
|
|
||||||
<xsl:if test="changes">
|
|
||||||
<h3>ChangeLog for <xsl:value-of select="title"/></h3>
|
|
||||||
<xsl:apply-templates select="changes"/>
|
|
||||||
</xsl:if>
|
|
||||||
-->
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="abstract">
|
|
||||||
<div align="center">
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</div>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="para">
|
|
||||||
<p><xsl:apply-templates/></p>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="ulink">
|
|
||||||
<a href="{@uri}"><xsl:value-of select="."/></a>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="release">
|
|
||||||
<ul>
|
|
||||||
<xsl:for-each select="action">
|
|
||||||
<li>
|
|
||||||
<xsl:value-of select="normalize-space(.)"/>
|
|
||||||
<xsl:if test="@dev">
|
|
||||||
<xsl:text>[</xsl:text><xsl:value-of select="@dev"/><xsl:text>]</xsl:text>
|
|
||||||
</xsl:if>
|
|
||||||
</li>
|
|
||||||
</xsl:for-each>
|
|
||||||
</ul>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
@ -1,89 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
||||||
|
|
||||||
<xsl:output method="html" indent="yes"/>
|
|
||||||
|
|
||||||
<xsl:template match="changes">
|
|
||||||
<xsl:variable name="version" select="@version"/>
|
|
||||||
<xsl:apply-templates select="document(@file,/)/changes/release[attribute::version=string($version)]"/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="announcement">
|
|
||||||
<style>
|
|
||||||
body { background-color: #FFFFFF }
|
|
||||||
p { font-size: 10pt; font-family: Helvetica, Arial, sans-serif }
|
|
||||||
li,ul { font-size: 10pt; font-family: Helvetica, Arial, sans-serif }
|
|
||||||
div { font-size: 10pt; font-family: Helvetica, Arial, sans-serif; font-style:italic }
|
|
||||||
h1 { font-size: 14pt; font-family: Helvetica, Arial, sans-serif; font-weight: bold }
|
|
||||||
h2 { font-size: 12pt; font-family: Helvetica, Arial, sans-serif; font-weight: bold }
|
|
||||||
h3 { font-size: 10pt; font-family: Helvetica, Arial, sans-serif; font-weight: bold }
|
|
||||||
A:link { color: #0000A0 } /* unvisited link */
|
|
||||||
A:visited { color: #A00000 } /* visited links */
|
|
||||||
A:active { color: #00A000 } /* active links */
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<a name="sig"><h2>PGP Signatures</h2></a>
|
|
||||||
|
|
||||||
<p>Many of the distribution kits have been digitally signed (using
|
|
||||||
PGP). If so, there will be an accompanying
|
|
||||||
<samp><em>distribution</em>.asc</samp> file in the same directory as
|
|
||||||
the distribution. The PGP keys can be found in the distribution
|
|
||||||
directory at <<a href="http://jakarta.apache.org/builds/jakarta-avalon/release/KEYS">
|
|
||||||
<samp>http://jakarta.apache.org/builds/jakarta-avalon/release/KEYS</samp></a>>.</p>
|
|
||||||
|
|
||||||
<xsl:variable name="filename"><xsl:value-of
|
|
||||||
select="project/downloads/@name"/>-<xsl:value-of
|
|
||||||
select="project/changes/@version"/>-bin.tar.gz</xsl:variable>
|
|
||||||
|
|
||||||
<pre>Always test available signatures, <i>e.g.</i>,
|
|
||||||
> pgpk -a KEYS
|
|
||||||
> pgpv <xsl:value-of select="$filename"/>.asc
|
|
||||||
<i>or</i>,
|
|
||||||
> pgp -ka KEYS
|
|
||||||
> pgp <xsl:value-of select="$filename"/>.asc
|
|
||||||
<i>or</i>,
|
|
||||||
> gpg --import KEYS
|
|
||||||
> gpg --verify <xsl:value-of select="$filename"/>.asc
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<xsl:for-each select="project">
|
|
||||||
<xsl:if test="downloads">
|
|
||||||
<h2>About <xsl:value-of select="title"/></h2>
|
|
||||||
<xsl:apply-templates select="."/>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:for-each>
|
|
||||||
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="project">
|
|
||||||
|
|
||||||
<p>For more information about <xsl:value-of select="title"/>, please go to
|
|
||||||
<a><xsl:attribute name="href"><xsl:value-of select="@site"/></xsl:attribute>
|
|
||||||
<xsl:value-of select="@site"/></a>.</p>
|
|
||||||
|
|
||||||
<!-- print out ChangeLog if present -->
|
|
||||||
<xsl:if test="changes">
|
|
||||||
<h3>ChangeLog for <xsl:value-of select="title"/></h3>
|
|
||||||
<xsl:apply-templates select="changes"/>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="ulink">
|
|
||||||
<a href="{@uri}"><xsl:value-of select="."/></a>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="release">
|
|
||||||
<ul>
|
|
||||||
<xsl:for-each select="action">
|
|
||||||
<li>
|
|
||||||
<xsl:value-of select="normalize-space(.)"/>
|
|
||||||
<xsl:if test="@dev">
|
|
||||||
<xsl:text>[</xsl:text><xsl:value-of select="@dev"/><xsl:text>]</xsl:text>
|
|
||||||
</xsl:if>
|
|
||||||
</li>
|
|
||||||
</xsl:for-each>
|
|
||||||
</ul>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
@ -1,92 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
||||||
xmlns:lxslt="http://xml.apache.org/xslt"
|
|
||||||
xmlns:my-ext="ext1"
|
|
||||||
extension-element-prefixes="my-ext"
|
|
||||||
>
|
|
||||||
|
|
||||||
<xsl:output method="xml" indent="yes"/>
|
|
||||||
<!--The component and its script are in the lxslt namespace and define the
|
|
||||||
implementation of the extension.-->
|
|
||||||
<lxslt:component prefix="my-ext" elements="timelapse" functions="getdate">
|
|
||||||
<lxslt:script lang="javascript">
|
|
||||||
var month = new Array (
|
|
||||||
"January",
|
|
||||||
"February",
|
|
||||||
"March",
|
|
||||||
"April",
|
|
||||||
"May",
|
|
||||||
"June",
|
|
||||||
"July",
|
|
||||||
"August",
|
|
||||||
"September",
|
|
||||||
"October",
|
|
||||||
"November",
|
|
||||||
"December"
|
|
||||||
);
|
|
||||||
|
|
||||||
function getdate()
|
|
||||||
{
|
|
||||||
var d = new Date();
|
|
||||||
var mo = month[d.getMonth()];
|
|
||||||
var dy = d.getDate();
|
|
||||||
var yr = d.getFullYear();
|
|
||||||
var dateString = dy + " " + mo + " " + yr;
|
|
||||||
return dateString;
|
|
||||||
}
|
|
||||||
</lxslt:script>
|
|
||||||
</lxslt:component>
|
|
||||||
|
|
||||||
<xsl:template match="changes">
|
|
||||||
<xsl:variable name="version" select="@version"/>
|
|
||||||
<xsl:apply-templates select="document(@file,/)/changes/release[attribute::version=string($version)]"/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="announcement">
|
|
||||||
<h3><xsl:value-of select="my-ext:getdate()"/> - <xsl:value-of select="title"/><xsl:text> Released</xsl:text></h3>
|
|
||||||
<xsl:apply-templates select="abstract"/>
|
|
||||||
|
|
||||||
<xsl:for-each select="project">
|
|
||||||
<p><b>About <xsl:value-of select="title"/>:</b>
|
|
||||||
<xsl:apply-templates select="."/>
|
|
||||||
</p>
|
|
||||||
</xsl:for-each>
|
|
||||||
|
|
||||||
<hr noshade="" size="1"/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="project">
|
|
||||||
<xsl:apply-templates select="description"/>
|
|
||||||
|
|
||||||
<p>For more information about <xsl:value-of select="title"/>, please go to
|
|
||||||
<a><xsl:attribute name="href"><xsl:value-of select="@site"/></xsl:attribute>
|
|
||||||
<xsl:value-of select="@site"/></a>.</p>
|
|
||||||
|
|
||||||
<!-- ignore changelog for site -->
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="abstract">
|
|
||||||
<p><xsl:apply-templates/></p>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="description">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="para">
|
|
||||||
<xsl:apply-templates select="para[position()=1]/node()"/>
|
|
||||||
<xsl:apply-templates select="para[position()>1]"/>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="para">
|
|
||||||
<p><xsl:apply-templates/></p>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="ulink">
|
|
||||||
<a href="{@uri}"><xsl:value-of select="."/></a>
|
|
||||||
</xsl:template>
|
|
||||||
</xsl:stylesheet>
|
|
@ -1,174 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
||||||
|
|
||||||
<xsl:output method="text" indent="no"/>
|
|
||||||
|
|
||||||
<xsl:template match="changes">
|
|
||||||
<xsl:variable name="version" select="@version"/>
|
|
||||||
<xsl:apply-templates select="document(@file,/)/changes/release[attribute::version=string($version)]"/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template name="print-title">
|
|
||||||
<xsl:param name="title"/>
|
|
||||||
<xsl:variable name="text" select="normalize-space($title)"/>
|
|
||||||
<xsl:value-of select="$text"/><xsl:text>
|
|
||||||
</xsl:text>
|
|
||||||
<xsl:call-template name="line">
|
|
||||||
<xsl:with-param name="len" select="string-length($text)"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
<xsl:text>
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="announcement">
|
|
||||||
<text>
|
|
||||||
<xsl:call-template name="print-title">
|
|
||||||
<xsl:with-param name="title"><xsl:value-of select="title"/> Released</xsl:with-param>
|
|
||||||
</xsl:call-template>
|
|
||||||
<xsl:call-template name="word-wrap">
|
|
||||||
<xsl:with-param name="text" select="normalize-space(abstract)"/>
|
|
||||||
<xsl:with-param name="count" select="0"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
<xsl:text>
|
|
||||||
|
|
||||||
</xsl:text>
|
|
||||||
<xsl:for-each select="project">
|
|
||||||
<xsl:call-template name="print-title">
|
|
||||||
<xsl:with-param name="title">About <xsl:value-of select="title"/></xsl:with-param>
|
|
||||||
</xsl:call-template>
|
|
||||||
<xsl:apply-templates select="."/>
|
|
||||||
<xsl:text>
|
|
||||||
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:for-each>
|
|
||||||
</text>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="project">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="description/para">
|
|
||||||
<xsl:for-each select="description/para">
|
|
||||||
<xsl:call-template name="word-wrap">
|
|
||||||
<xsl:with-param name="text">
|
|
||||||
<xsl:apply-templates select="."/>
|
|
||||||
</xsl:with-param>
|
|
||||||
<xsl:with-param name="count" select="0"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
<xsl:text>
|
|
||||||
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:for-each>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:call-template name="word-wrap">
|
|
||||||
<xsl:with-param name="text">
|
|
||||||
<xsl:apply-templates select="description"/>
|
|
||||||
</xsl:with-param>
|
|
||||||
<xsl:with-param name="count" select="0"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
<xsl:text>
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
<xsl:text>
|
|
||||||
For more information about </xsl:text>
|
|
||||||
<xsl:value-of select="title"/>
|
|
||||||
<xsl:text>, please go to
|
|
||||||
</xsl:text>
|
|
||||||
<xsl:value-of select="@site"/>
|
|
||||||
|
|
||||||
<!-- print out ChangeLog if present -->
|
|
||||||
<xsl:if test="changes">
|
|
||||||
<xsl:text>
|
|
||||||
|
|
||||||
ChangeLog for </xsl:text>
|
|
||||||
<xsl:value-of select="title"/>
|
|
||||||
<xsl:text>
|
|
||||||
|
|
||||||
</xsl:text>
|
|
||||||
<xsl:apply-templates select="changes"/>
|
|
||||||
</xsl:if>
|
|
||||||
|
|
||||||
<!-- print out Downloads if present -->
|
|
||||||
<xsl:if test="downloads">
|
|
||||||
<xsl:text>
|
|
||||||
Downloads for </xsl:text><xsl:value-of select="title"/> available at
|
|
||||||
|
|
||||||
<xsl:value-of select="downloads/@base"/>/latest
|
|
||||||
</xsl:if>
|
|
||||||
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="para">
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
<xsl:text>
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="ulink">
|
|
||||||
<xsl:value-of select="."/>
|
|
||||||
<xsl:text> (</xsl:text>
|
|
||||||
<xsl:value-of select="@uri"/>
|
|
||||||
<xsl:text>)</xsl:text>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="release">
|
|
||||||
<xsl:for-each select="action">
|
|
||||||
<xsl:text>*) </xsl:text>
|
|
||||||
<xsl:call-template name="word-wrap">
|
|
||||||
<xsl:with-param name="text" select="."/>
|
|
||||||
<xsl:with-param name="count" select="0"/>
|
|
||||||
</xsl:call-template><xsl:text> </xsl:text>
|
|
||||||
<xsl:if test="@dev">
|
|
||||||
<xsl:text>[</xsl:text><xsl:value-of select="@dev"/><xsl:text>]</xsl:text>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:text>
|
|
||||||
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:for-each>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template name="line">
|
|
||||||
<xsl:param name="len"/>
|
|
||||||
<xsl:if test="number($len) > 0">
|
|
||||||
<xsl:text>-</xsl:text>
|
|
||||||
<xsl:call-template name="line">
|
|
||||||
<xsl:with-param name="len" select="number($len)-1"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template name="word-wrap">
|
|
||||||
<xsl:param name="text"/>
|
|
||||||
<xsl:param name="count"/>
|
|
||||||
<xsl:param name="mytext" select="normalize-space($text)"/>
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="$count > 40">
|
|
||||||
<xsl:text>
|
|
||||||
</xsl:text>
|
|
||||||
<xsl:call-template name="word-wrap">
|
|
||||||
<xsl:with-param name="text" select="$mytext"/>
|
|
||||||
<xsl:with-param name="count" select="0"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:when test="not(contains($mytext,' '))">
|
|
||||||
<xsl:text> </xsl:text>
|
|
||||||
<xsl:value-of select="$mytext"/>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:variable name="word" select="substring-before($mytext,' ')"/>
|
|
||||||
<xsl:variable name="remainder" select="substring-after($mytext,' ')"/>
|
|
||||||
<xsl:text> </xsl:text>
|
|
||||||
<xsl:value-of select="$word"/>
|
|
||||||
<xsl:if test="string-length($word) > 0">
|
|
||||||
<xsl:call-template name="word-wrap">
|
|
||||||
<xsl:with-param name="text" select="$remainder"/>
|
|
||||||
<xsl:with-param name="count" select="$count + string-length($word)"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
@ -1,36 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<xsl:stylesheet version="1.0"
|
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
||||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
|
||||||
<!-- @author <a href="mailto:barozzi@nicolaken.com">Nicola Ken Barozzi</a> -->
|
|
||||||
<xsl:template match="html:body">
|
|
||||||
<patch-queue>
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</patch-queue>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="html:tr">
|
|
||||||
<xsl:if test="contains(@class,'th')">
|
|
||||||
<bug>
|
|
||||||
<xsl:attribute name="id"><xsl:value-of select="html:td[1]/html:a"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="url">http://nagoya.apache.org/bugzilla/<xsl:value-of select="html:td[1]/html:a/@href"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="severity"><xsl:value-of select="html:td[2]"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="priority"><xsl:value-of select="html:td[3]"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="platform"><xsl:value-of select="html:td[4]"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="owner"><xsl:value-of select="html:td[5]"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="status"><xsl:value-of select="html:td[6]"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="resolution"><xsl:value-of select="html:td[7]"/></xsl:attribute>
|
|
||||||
<xsl:attribute name="summary"><xsl:value-of select="html:td[8]"/></xsl:attribute>
|
|
||||||
</bug>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
|
|
||||||
<xsl:template match="@*|*|text()|processing-instruction()">
|
|
||||||
<xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
@ -1,95 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
|
||||||
|
|
||||||
<xsl:output indent="yes"/>
|
|
||||||
|
|
||||||
<xsl:param name="module">module</xsl:param>
|
|
||||||
<xsl:param name="cvsweb">cvsweb</xsl:param>
|
|
||||||
|
|
||||||
<xsl:template match="/">
|
|
||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" type="text/css" href="../../../../html/javadoc.css" title="Style"></link>
|
|
||||||
</head>
|
|
||||||
<body bgcolor="white">
|
|
||||||
<h1>Change Log</h1>
|
|
||||||
|
|
||||||
<xsl:apply-templates select="changelog/entry">
|
|
||||||
<xsl:sort order="descending" select="date" />
|
|
||||||
</xsl:apply-templates>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="entry">
|
|
||||||
|
|
||||||
<h2>
|
|
||||||
<xsl:call-template name="escape-return">
|
|
||||||
<xsl:with-param name="string"><xsl:value-of select="msg"/></xsl:with-param>
|
|
||||||
</xsl:call-template>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
<b>
|
|
||||||
<xsl:apply-templates select="date"/>
|
|
||||||
by <xsl:value-of disable-output-escaping="yes" select="author"/>
|
|
||||||
</b>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<xsl:apply-templates select="file"/>
|
|
||||||
</p>
|
|
||||||
<hr/>
|
|
||||||
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="date">
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="weekday">
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="time">
|
|
||||||
<xsl:apply-templates/>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="file">
|
|
||||||
<br/><a>
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="string-length(prevrevision) = 0 ">
|
|
||||||
<xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?rev=<xsl:value-of select="revision" />&content-type=text/x-cvsweb-markup</xsl:attribute>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:attribute name="href"><xsl:value-of select="$cvsweb"/><xsl:value-of select="$module" />/<xsl:value-of select="name" />?r1=<xsl:value-of select="revision" />&r2=<xsl:value-of select="prevrevision"/>&diff_format=h</xsl:attribute>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
<xsl:value-of select="name" />
|
|
||||||
</a>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template name="escape-return">
|
|
||||||
<xsl:param name="string"/>
|
|
||||||
<!-- must be a better way to define a carrige return -->
|
|
||||||
<xsl:variable name="return"><xsl:text>
|
|
||||||
</xsl:text>
|
|
||||||
</xsl:variable>
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="contains($string, $return)">
|
|
||||||
<xsl:value-of select="substring-before($string, $return)"/><br/>
|
|
||||||
<xsl:call-template name="escape-return">
|
|
||||||
<xsl:with-param name="string">
|
|
||||||
<xsl:value-of select="substring-after($string, $return)"/>
|
|
||||||
</xsl:with-param>
|
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:value-of select="$string"/>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user