Move httpd-docs-build underneath httpd/ per dev@httpd.


git-svn-id: https://svn.apache.org/repos/asf/httpd/docs-build/trunk@106695 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/build.bat b/build.bat
new file mode 100644
index 0000000..ff88132
--- /dev/null
+++ b/build.bat
@@ -0,0 +1,95 @@
+@echo off
+
+REM   Copyright (c) 2001-2004 The Apache Software Foundation.  All rights
+REM   reserved.
+
+REM   This file is derived from the ant-1.5.3 distribution
+
+REM   +++ Changes for dedicated httpd documentation build +++
+REM
+REM   - no call of antrc_pre.bat and antrc_post.bat
+REM   - DEFAULT_ANT_HOME is the current directory (instead of parent)
+REM   - ignore external ANT_OPTS
+REM   - ignore external ANT_ARGS
+REM   - ignore external CLASSPATH
+REM   - set java stack size to 128 MB
+REM   - lower down verbosity (because the foreach task would be _very_ verbose
+REM     otherwise)
+REM   - lcp.bat is found in lib/ (instead of bin/)
+REM
+REM   (don't know whether this all works unter win9x; tested on win2k) --nd
+
+if "%OS%"=="Windows_NT" @setlocal
+
+rem explicit name our build file (may be replaced by a variable some time)
+rem lower down logger verbosity
+set ANT_ARGS=-buildfile build.xml -logger org.apache.tools.ant.NoBannerLogger
+
+rem raise stack size ...
+set ANT_OPTS=-Xmx128m -mx128m
+
+rem set classpath
+set CLASSPATH=lib
+
+rem set regexp engine
+set REGEXP=-Dant.regexp.regexpimpl=org.apache.tools.ant.util.regexp.JakartaOroRegexp
+
+rem %~dp0 is expanded pathname of the current script under NT
+set DEFAULT_ANT_HOME=%~dp0.
+
+if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
+set DEFAULT_ANT_HOME=
+
+rem Slurp the command line arguments. This loop allows for an unlimited number
+rem of arguments (up to the command line limit, anyway).
+set ANT_CMD_LINE_ARGS=%1
+if ""%1""=="""" goto doneStart
+shift
+:setupArgs
+if ""%1""=="""" goto doneStart
+set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
+shift
+goto setupArgs
+rem This label provides a place for the argument list loop to break out 
+rem and for NT handling to skip to.
+
+:doneStart
+rem find ANT_HOME if it does not exist due to either an invalid value passed
+rem by the user or the %0 problem on Windows 9x
+if exist "%ANT_HOME%\lib\ant.jar" goto checkJava
+
+echo ANT_HOME is set incorrectly or 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%\lib\lcp.bat" %%i
+
+if "%JAVA_HOME%" == "" goto noJavaHome
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
+if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
+if exist "%JAVA_HOME%\lib\tools.jar" set LOCALCLASSPATH=%JAVA_HOME%\lib\tools.jar;%LOCALCLASSPATH%
+if exist "%JAVA_HOME%\lib\classes.zip" set LOCALCLASSPATH=%JAVA_HOME%\lib\classes.zip;%LOCALCLASSPATH%
+goto runAnt
+
+:noJavaHome
+if "%_JAVACMD%" == "" set _JAVACMD=java.exe
+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.
+
+:runAnt
+"%_JAVACMD%" %ANT_OPTS% -Xbootclasspath/p:"%LOCALCLASSPATH%" -classpath "%LOCALCLASSPATH%" %REGEXP% "-Dant.home=%ANT_HOME%" org.apache.tools.ant.Main %ANT_ARGS% %ANT_CMD_LINE_ARGS%
+
+:end
+set LOCALCLASSPATH=
+set _JAVACMD=
+set ANT_CMD_LINE_ARGS=
+
+if "%OS%"=="Windows_NT" @endlocal
+
+:mainEnd
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..9373f54
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,131 @@
+#! /bin/sh
+
+#   Copyright (c) 2001-2004 The Apache Software Foundation.  All rights
+#   reserved.
+
+#   This file is derived from the ant-1.5.3 distribution
+
+#   +++ Changes for dedicated httpd documentation build +++
+#
+#   - ANT_HOME is the current directory (instead of parent)
+#   - ignore external ANT_OPTS
+#   - ignore external ANT_ARGS
+#   - ignore external CLASSPATH
+#   - set java stack size to 128 MB
+#   - lower down verbosity (because the foreach task would be _very_ verbose
+#     otherwise)
+#
+
+# explicit name our build file (may be replaced by a variable some time)
+ANT_ARGS="-buildfile build.xml"
+
+# lower down logger verbosity
+ANT_ARGS="-logger org.apache.tools.ant.NoBannerLogger $ANT_ARGS"
+
+# set regexp engine
+ANT_ARGS="-Dant.regexp.regexpimpl=org.apache.tools.ant.util.regexp.JakartaOroRegexp $ANT_ARGS"
+
+# raise stack size...
+ANT_OPTS="-Xmx128m -mx128m"
+
+# set classpath
+CLASSPATH=./lib
+
+# set ant home directory (cwd)
+ANT_HOME=.
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  Darwin*) darwin=true
+           if [ -z "$JAVA_HOME" ] ; then
+             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home   
+           fi
+           ;;
+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
+
+# set ANT_LIB location
+ANT_LIB="${ANT_HOME}/lib"
+
+if [ -z "$JAVACMD" ] ; then 
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD=`which java 2> /dev/null `
+    if [ -z "$JAVACMD" ] ; then 
+        JAVACMD=java
+    fi
+  fi
+fi
+ 
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly."
+  echo "  We cannot execute $JAVACMD"
+  exit 1
+fi
+
+if [ -n "$CLASSPATH" ] ; then
+  LOCALCLASSPATH="$CLASSPATH"
+fi
+
+# add in the dependency .jar files
+for i in "${ANT_LIB}"/*.jar
+do
+  # if the directory is empty, then it will return the input string
+  # this is stupid, so case for it
+  if [ -f "$i" ] ; then
+    if [ -z "$LOCALCLASSPATH" ] ; then
+      LOCALCLASSPATH="$i"
+    else
+      LOCALCLASSPATH="$i":"$LOCALCLASSPATH"
+    fi
+  fi
+done
+
+if [ -n "$JAVA_HOME" ] ; then
+  if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
+    LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar"
+  fi
+
+  if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
+    LOCALCLASSPATH="$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip"
+  fi
+else
+  echo "Warning: JAVA_HOME environment variable is not set (or not exported)."
+  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
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  ANT_HOME=`cygpath --windows "$ANT_HOME"`
+  JAVA_HOME=`cygpath --windows "$JAVA_HOME"`
+  CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"`
+  CYGHOME=`cygpath --windows "$HOME"`
+fi
+
+if [ -n "$CYGHOME" ]; then
+    exec "$JAVACMD" $ANT_OPTS -Xbootclasspath/p:"$LOCALCLASSPATH" -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" -Dcygwin.user.home="$CYGHOME" org.apache.tools.ant.Main $ANT_ARGS "$@"
+else
+    exec "$JAVACMD" $ANT_OPTS -Xbootclasspath/p:"$LOCALCLASSPATH" -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" org.apache.tools.ant.Main $ANT_ARGS "$@"
+fi
+
diff --git a/build.xml b/build.xml
new file mode 100644
index 0000000..7fb317e
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,799 @@
+<?xml version="1.0"?>
+<!DOCTYPE project [ <!ENTITY desc SYSTEM "../style/description.xml"> ]>
+
+<!--
+ Copyright 2002-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<project name="manual" default="en" basedir=".">
+<!-- for a description type 'build -projecthelp' -->
+&desc;
+
+<!-- load prerequisites and dependency defs -->
+<import file="prereq.xml" />
+<import file="deps.xml" />
+<import file="../style/lang-targets.xml" />
+
+
+<!-- #################################################################### -->
+<!-- build targets                                                        -->
+<!-- #################################################################### -->
+
+<target name="dist-all" description="- builds all, zip-all and war-all"
+    depends="all, zip-all, war-all" />
+
+
+<pathconvert
+    property="ap.docroot"
+      dirsep="${file.separator}"
+     pathsep=" ">
+    <path><pathelement path="..${file.separator}" /></path>
+</pathconvert>
+
+<!-- typemaps                                                             -->
+<!-- ==================================================================== -->
+<target name="typemaps" depends="metafiles" unless="typemaps.done"
+        description="- (re-)builds all typemap files if necessary">
+    <echo message="checking typemaps..." />
+
+    <dependencies.typemaps />
+
+    <!-- iterate over all desired files -->
+    <for param="srcfile">
+        <path>
+            <fileset dir="../" includes="**/*.xml.meta">
+                <patternset refid="excludes" />
+                <patternset refid="scratch" />
+            </fileset>
+        </path>
+
+        <sequential>
+            <basename property="@{srcfile}.basename" file="@{srcfile}"
+                        suffix=".xml.meta"/>
+            <dirname  property="@{srcfile}.dirname"  file="@{srcfile}"/>
+
+            <xslt in="@{srcfile}"
+                 out="${@{srcfile}.dirname}/${@{srcfile}.basename}.html"
+               style="../style/xsl/typemap.xsl">
+                <xmlcatalog refid="w3c-catalog" />
+            </xslt>
+        </sequential>
+    </for>
+
+    <echo message="typemaps are up to date." />
+    <property name="typemaps.done" value="yes!" />
+</target>
+
+
+<!-- XHTML validation.                                                    -->
+<!-- The resulting output is intended to be valid (X)HTML. Check it from  -->
+<!-- time to time...                                                      -->
+<!-- ==================================================================== -->
+<target name="validate-xhtml" description="- validates all (X)HTML result files">
+    <xmlvalidate lenient="false" failonerror="false" warn="true">
+        <xmlcatalog refid="w3c-catalog" />
+        <fileset dir="../" includes="**/*.html.*">
+            <patternset refid="scratch" />
+        </fileset>
+    </xmlvalidate>
+</target>
+
+
+<!-- metafiles maintenance target.                                        -->
+<!-- If you're confused how to edit the *.xml.meta files, just run        -->
+<!-- `build metafiles`, which checks and possibly rebuilds them           -->
+<!-- automatically for you.                                               --> 
+<!-- ==================================================================== -->
+<target name="metafiles" depends="modulelists" unless="metafiles.done"
+        description="- (re-)builds all *.xml.meta files if necessary">
+
+    <dependencies.perlcheck />
+
+    <if><equals arg1="${perl.available}" arg2="yes" /><then>
+        <echo message="checking metafiles..." />
+
+        <delete>
+            <fileset dir="../" includes=".outdated*" />
+        </delete>
+
+        <apply executable="perl" dir="../" parallel="false" failonerror="true">
+            <env key="DOCROOT" value="${ap.docroot}" />
+
+            <arg value="build/lib/metafile.pl" />
+            <arg value="${inputext.en}" />
+            <srcfile />
+
+            <dirset dir="../">
+                <patternset refid="scratch" />
+                <patternset refid="baddirs" />
+            </dirset>
+        </apply>
+
+        <echo message="metafiles are up to date." />
+    </then>
+    <else>
+        <echo message="skipping metafiles (requires a working perl installation in PATH)." />
+    </else></if>
+
+    <property name="metafiles.done" value="yes!" />
+</target>
+
+
+<!-- modulelists maintenance target.                                      -->
+<!-- If you're confused how to edit the allmodules.xml* files, just run   -->
+<!-- `build modulelists`, which checks and possibly rebuilds them         -->
+<!-- automatically for you. It's not invoked by default, because it       -->
+<!-- needs a perl installation in PATH.                                   -->
+<!-- ==================================================================== -->
+<target name="modulelists" unless="modulelists.done"
+        description="- (re-)builds all allmodules.xml* files if necessary">
+
+    <dependencies.perlcheck />
+
+    <if><equals arg1="${perl.available}" arg2="yes" />
+    <then>
+        <echo message="checking modulelists..." />
+
+        <exec dir="../" executable="perl">
+            <env key="DOCROOT" value="${ap.docroot}" />
+
+            <arg line="build/lib/allmodules.pl" />
+        </exec>
+
+        <echo message="modulelists are up to date." />
+    </then>
+    <else>
+        <echo message="skipping modulelists (requires a working perl installation in PATH)." />
+    </else>
+    </if>
+
+    <property name="modulelists.done" value="yes!" />
+</target>
+
+
+<!-- Pack the buildtools                                                  -->
+<!--                                                                      -->
+<!-- This target is mostly useful for the website maintainers to provide  -->
+<!-- a zipped package of the build tool stuff for users without cvs.      -->
+<!-- ==================================================================== -->
+<target name="tools" description="- builds the zipped tool package">
+
+    <dependencies.tools />
+
+    <!-- Convenience for windows users -->
+    <copy file="../_tools/lib/LICENSE" tofile="../_tools/lib/LICENSE.txt" />
+    <copy file="../_tools/lib/README" tofile="../_tools/lib/README.txt" />
+    <copy file="../_tools/lib/NOTICE" tofile="../_tools/lib/NOTICE.txt" />
+
+    <!-- newline issues -->
+    <fixcrlf srcdir="../_tools" eol="crlf" includes="**/*.txt **/*.bat" />
+    <fixcrlf srcdir="../_tools" eol="lf" includes="**/*.sh **/*.pl
+                                                   **/*.pm **/README
+                                                   **/LICENSE **/NOTICE
+                                                   **/*.xml **/*.dtd **/*.ent
+                                                  "/>
+
+    <!-- get the current date -->
+    <tstamp>
+        <format property="tools.date" pattern="yyyy-MM-dd" timezone="UTC" />
+    </tstamp>
+
+    <!-- and zzzzzzip -->
+    <delete file="${distdir}/tools-${tools.date}.zip" />
+    <zip destfile="${distdir}/tools-${tools.date}.zip"
+         compress="true"
+         encoding="ASCII">
+        <zipfileset prefix="build"
+                       dir="../_tools"
+                  includes="**/*">
+        </zipfileset>
+    </zip>
+</target>
+
+
+<!-- clean up scratch directories and files                               -->
+<!--                                                                      -->
+<target name="clean"
+        description="- cleans up most generated files and directories">
+    <delete dir="../_chm" />
+    <delete dir="../_off" />
+    <delete dir="../_tools" />
+    <delete dir="../_dist" />
+    <delete dir="../style/_generated" />
+    <delete>
+        <fileset dir="../" includes="**/*.tex **/*.aux **/*.out **/*.log
+                                     **/*.pdf **/*.toc .outdated*
+                                     mod/.translated.*" />
+    </delete>
+</target>
+
+<!-- clean up scratch directories and files                               -->
+<!--                                                                      -->
+<target name="extraclean" depends="clean"
+        description="- 'clean' plus the perl generated files (metafiles)">
+    <delete>
+        <fileset dir="../" includes="**/*.xml.meta mod/allmodules.xml*" />
+    </delete>
+
+    <!-- this forces a rebuild of all files next time -->
+    <touch>
+        <fileset dir="../style/lang" includes="*.xml" />
+    </touch>
+</target>
+
+
+<!-- bootstrap                                                            -->
+<!-- Boostrap languages                                                   -->
+<!-- ==================================================================== -->
+<target name="bootstrap"
+        description="- boostraps languages from style/lang/*.xml">
+    <echo message="starting bootstrap..." />
+
+    <dependencies.bootstrap />
+
+    <!-- create basic styles -->
+    <var name="languages" value="" />
+    <for param="srcfile">
+        <path>
+            <fileset dir="../style/lang" includes="**/*.xml" />
+        </path>
+
+        <sequential>
+            <basename property="@{srcfile}.basename" file="@{srcfile}"
+                        suffix=".xml"/>
+            <dirname  property="@{srcfile}.dirname"  file="@{srcfile}"/>
+
+            <var name="languages" value="${languages} ${@{srcfile}.basename}" />
+
+            <xslt in="@{srcfile}"
+                 out="../style/manual.${@{srcfile}.basename}.xsl"
+               style="../style/xsl/language.xsl">
+                <param name="type" expression="manual" />
+            </xslt>
+        </sequential>
+    </for>
+
+    <!-- create language list (in is unused -> arbitrary xml file) -->
+    <xslt in="../style/lang/en.xml"
+         out="../style/_generated/list.xml"
+       style="../style/xsl/language.xsl" force="yes">
+        <param name="type" expression="list" />
+        <param name="langs" expression="${languages}" />
+    </xslt>
+
+    <!-- create typemap designation data -->
+    <xslt in="../style/_generated/list.xml"
+         out="../style/xsl/util/designations.xml"
+       style="../style/xsl/language.xsl">
+        <param name="type" expression="design" />
+    </xslt>
+
+    <!-- create language targets -->
+    <xslt in="../style/_generated/list.xml"
+         out="../style/lang-targets.xml"
+       style="../style/xsl/language.xsl">
+        <param name="type" expression="targets" />
+    </xslt>
+
+    <!-- create allmodules list -->
+    <xslt in="../style/_generated/list.xml"
+         out="../style/xsl/util/allmodules.xml"
+       style="../style/xsl/language.xsl">
+        <param name="type" expression="modlists" />
+    </xslt>
+
+    <!-- create project description -->
+    <xslt in="../style/_generated/list.xml"
+         out="../style/description.xml"
+       style="../style/xsl/language.xsl">
+        <param name="type" expression="desc" />
+    </xslt>
+
+    <echo message="bootstrap done." />
+</target>
+
+
+<!-- #################################################################### -->
+<!-- helper targets, not intended to be called from commandline           -->
+<!-- #################################################################### -->
+
+
+<!-- Generic html transformation task.                                    -->
+<!-- checks and transforms all files of one language variant to HTML      -->
+<!--                                                                      -->
+<macrodef name="html.generic">
+    <attribute name="lang" />
+
+    <sequential>
+        <echo message="checking HTML documentation (@{lang})..." />
+
+        <runtarget target="metafiles" />
+        <dependencies.html lang="@{lang}" />
+
+        <!-- iterate over all desired files -->
+        <for param="srcfile">
+            <path>
+                <fileset dir="../" includes="**/*${inputext.@{lang}}">
+                    <patternset refid="excludes" />
+                    <patternset refid="scratch" />
+                </fileset>
+            </path>
+
+            <sequential>
+                <basename property="@{srcfile}.basename" file="@{srcfile}"
+                            suffix="${inputext.@{lang}}" />
+                <dirname  property="@{srcfile}.dirname"  file="@{srcfile}" />
+        
+                <!-- depends on the accompanying metafile -->
+                <dependset>
+                    <srcfileset dir="${@{srcfile}.dirname}"
+                           includes="${@{srcfile}.basename}.xml.meta" />
+                    <targetfileset dir="${@{srcfile}.dirname}"
+                       includes="${@{srcfile}.basename}${outputext.@{lang}}" />
+                </dependset>
+        
+                <xslt in="@{srcfile}"
+                     out="${@{srcfile}.dirname}/${@{srcfile}.basename}${outputext.@{lang}}"
+                   style="../style/manual.@{lang}.xsl">
+                    <xmlcatalog refid="w3c-catalog" />
+                </xslt>
+            </sequential>
+        </for>
+
+        <if><not><available file="../.outdated.@{lang}" /></not><then>
+            <echo message="HTML documentation (@{lang}) is up to date." />
+        </then></if>
+
+        <!-- for convenience -->
+        <runtarget target="typemaps" />
+
+        <!-- for caution -->
+        <show.outdated lang="@{lang}" />
+
+    </sequential>
+</macrodef>
+
+<macrodef name="show.outdated">
+    <attribute name="lang" />
+
+    <sequential>
+        <if><available file="../.outdated.@{lang}" /><then>
+        <concat>
+            <header>
+================================================================
+===== NOTE: The following translations are NOT UP TO DATE: =====
+================================================================
+            </header>
+
+            <filelist dir="../" files=".outdated.@{lang}" />
+        </concat></then>
+        </if>
+    </sequential>
+</macrodef>
+
+
+<!-- Generic manpage transformation target.                               -->
+<!-- checks and transforms all files of one language variant to nroff     -->
+<!--                                                                      -->
+<macrodef name="nroff.generic">
+    <attribute name="lang" />
+
+    <sequential>
+        <echo message="checking nroff man pages (@{lang})..." />
+
+        <!-- <runtarget target="metafiles" /> -->
+        <dependencies.nroff lang="@{lang}" />
+
+        <!-- iterate over all (8) files -->
+        <nroff.generic.loop lang="@{lang}" section="8"
+                files="ab${inputext.@{lang}}
+                       apachectl${inputext.@{lang}}
+                       apxs${inputext.@{lang}}
+                       httpd${inputext.@{lang}}
+                       htcacheclean${inputext.@{lang}}
+                       logresolve${inputext.@{lang}}
+                       rotatelogs${inputext.@{lang}}
+                       suexec${inputext.@{lang}}"/>
+
+        <!-- iterate over all (1) files -->
+        <nroff.generic.loop lang="@{lang}" section="1"
+                files="dbmmanage${inputext.@{lang}}
+                       htdigest${inputext.@{lang}}
+                       htpasswd${inputext.@{lang}}"/>
+
+        <!-- cleanup -->
+        <delete>
+            <fileset dir="../../man" includes="*.tmp *.old" />
+        </delete>
+
+        <echo message="nroff manpages (@{lang}) are up to date." />
+    </sequential>
+</macrodef>
+
+
+<!-- nroff generation of a single section                                 -->
+<!--                                                                      -->
+<macrodef name="nroff.generic.loop">
+    <attribute name="lang" />
+    <attribute name="section" />
+    <attribute name="files" />
+
+    <sequential>
+        <for param="srcfile">
+            <path>
+                <fileset dir="../programs/" includes="@{files}" />
+            </path>
+
+            <sequential>
+                <basename property="@{srcfile}.basename" file="@{srcfile}"
+                            suffix="${inputext.@{lang}}"/>
+                <dirname  property="@{srcfile}.dirname"  file="@{srcfile}"/>
+
+                <dependset>
+                    <srcfileset dir="${@{srcfile}.dirname}"
+                           includes="${@{srcfile}.basename}.xml.meta" />
+                    <targetfileset dir="../../man/"
+                           includes="${@{srcfile}.basename}.@{section}" />
+                </dependset>
+
+                <if>
+                    <not>
+                        <uptodate
+                            srcfile="@{srcfile}"
+                         targetfile="../../man/${@{srcfile}.basename}.@{section}"
+                        />
+                    </not>
+                <then>
+                    <if>
+                        <available
+                            file="../../man/${@{srcfile}.basename}.@{section}.tmp"
+                        />
+                    <then>
+                        <copy file="../../man/${@{srcfile}.basename}.@{section}.tmp"
+                            tofile="../../man/${@{srcfile}.basename}.@{section}.old"
+                            preservelastmodified="true" overwrite="true" />
+
+                        <!-- sample line:                                         -->
+                        <!-- .TH "AB" 8 "2004-01-04" "Apache HTTP Server" "ab"    -->
+                        <!-- we replace  ^^^^^^^^^^ the date with @@date@@        -->
+                        <!--                                                      -->
+                        <replaceregexp
+                             file="../../man/${@{srcfile}.basename}.@{section}.tmp"
+                            match='^(\.TH\s+"[^"]*"\s+\d\s+)"[^"]+"'
+                          replace='\1"@@date@@"'
+                           byline="true"
+                        />
+                    </then></if>
+
+                    <xslt in="@{srcfile}"
+                         out="../../man/${@{srcfile}.basename}.@{section}"
+                       style="../style/_generated/man.@{lang}.xsl">
+                        <xmlcatalog refid="w3c-catalog" />
+                        <param name="section" expression="@{section}" />
+                        <param name="date" expression="@@date@@" />
+                    </xslt>
+
+                    <if>
+                        <and>
+                            <available
+                                file="../../man/${@{srcfile}.basename}.@{section}.old"
+                            />
+                            <filesmatch
+                                file1="../../man/${@{srcfile}.basename}.@{section}.tmp"
+                                file2="../../man/${@{srcfile}.basename}.@{section}"
+                            />
+                        </and>
+                    <then>
+                        <copy file="../../man/${@{srcfile}.basename}.@{section}.old"
+                            tofile="../../man/${@{srcfile}.basename}.@{section}"
+                            preservelastmodified="false" overwrite="true" />
+                    </then>
+                    <else>
+                        <replaceregexp
+                               file="../../man/${@{srcfile}.basename}.@{section}"
+                              match="@@date@@"
+                            replace="${nroff.date}"
+                        />
+                    </else></if>
+                </then></if>
+            </sequential>
+        </for>
+    </sequential>
+</macrodef>
+
+
+<!-- Generic chm transformation target.                                   -->
+<!-- checks and transforms all files of one language variant to           -->
+<!-- MS compiled html format (chm). The HTML files are different from     -->
+<!-- the normal manual output, so don't worry that everything is          -->
+<!-- compiled again.                                                      -->
+<!--                                                                      -->
+<!-- REQUIREMENTS:                                                        -->
+<!-- (1) You must have the hhc.exe compiler in your PATH. It is part of   -->
+<!--     the HTML Help Workshop which is freely available and can be      -->
+<!--     downloaded from                                                  -->
+<!--     http://msdn.microsoft.com/library/en-us/htmlhelp/html/hwMicrosoftHTMLHelpDownloads.asp -->
+<!--                                                                      -->
+<!-- (2) Before you run `build chm-$lang` you MUST switch to the          -->
+<!--     appropriate locale. Otherwise the output of hhc.exe will         -->
+<!--     probably be garbled.                                             -->
+<!--                                                                      -->
+<macrodef name="chm.generic">
+    <attribute name="lang" />
+
+    <sequential>
+        <echo message="building CHM file (@{lang})..." />
+
+        <runtarget target="metafiles" />
+        <dependencies.chm lang="@{lang}" />
+
+        <!-- build project file from sitemap -->
+        <xslt in="../_chm/@{lang}/sitemap${inputext.@{lang}}"
+             out="../_chm/@{lang}/manual.hhp"
+           style="../_chm/@{lang}/style/_generated/hhp.@{lang}.xsl">
+            <param name="httpd.version" expression="${ap.httpd.version}" />
+            <xmlcatalog refid="w3c-catalog" />
+        </xslt>
+        <fixcrlf srcdir="../_chm/@{lang}" eol="crlf" includes="manual.hhp" />
+
+        <!-- build toc from sitemap -->
+        <xslt in="../_chm/@{lang}/sitemap${inputext.@{lang}}"
+             out="../_chm/@{lang}/toc.hhc"
+           style="../_chm/@{lang}/style/_generated/hhc.@{lang}.xsl">
+            <xmlcatalog refid="w3c-catalog" />
+        </xslt>
+        <fixcrlf srcdir="../_chm/@{lang}" eol="crlf" includes="toc.hhc" />
+
+        <!-- build not-yet-translated documents -->
+        <if><not><equals arg1="@{lang}" arg2="en" /></not><then>
+            <chm.generic.loop lang="en" target="@{lang}" />
+        </then></if>
+
+         <!-- iterate over all documents -->
+        <chm.generic.loop lang="@{lang}" target="@{lang}" />
+
+        <!-- compile it -->
+        <if><not><equals arg1="${chm.prepare}" arg2="yes" /></not><then>
+            <exec dir="../_chm/@{lang}" executable="hhc.exe">
+                <arg line="manual.hhp" />
+            </exec>
+
+            <copy file="../_chm/@{lang}/httpd-docs-${ap.httpd.version}.@{lang}.chm"
+                tofile="${distdir}/httpd-docs-${ap.httpd.version}.@{lang}.chm"
+             overwrite="true" />
+        </then>
+        <else>
+            <echo message="This is a preparation run only. To actually compile" />
+            <echo message="the CHM file you need to go into the _chm/@{lang}" />
+            <echo message="directory and run 'hhc.exe manual'. Don't forget the" />
+            <echo message="appropriate locale (see `build -projecthelp`)" />
+        </else></if>
+    </sequential>
+</macrodef>
+
+<macrodef name="chm.generic.loop">
+    <attribute name="lang" />
+    <attribute name="target" />
+
+    <sequential>
+        <for param="srcfile">
+            <path>
+                <fileset dir="../_chm/@{target}" includes="**/*${inputext.@{lang}}">
+                    <patternset refid="excludes" />
+                </fileset>
+            </path>
+
+            <sequential>
+                <basename property="@{srcfile}.basename" file="@{srcfile}"
+                            suffix="${inputext.@{lang}}"/>
+                <dirname  property="@{srcfile}.dirname"  file="@{srcfile}"/>
+
+                <!-- just do it -->
+                <xslt in="@{srcfile}"
+                     out="${@{srcfile}.dirname}/${@{srcfile}.basename}.html"
+                   style="../_chm/@{target}/style/_generated/chm.@{lang}.xsl"
+                   force="yes">
+                    <xmlcatalog refid="w3c-catalog" />
+                </xslt>
+
+                <fixcrlf srcdir="${@{srcfile}.dirname}" eol="crlf"
+                       includes="${@{srcfile}.basename}.html" />
+            </sequential>
+        </for>
+    </sequential>
+</macrodef>
+
+
+<!-- Generic zip package transformation target.                           -->
+<!-- checks and transforms all files of one language variant to           -->
+<!-- simple html files and zips the resulting directory. The HTML files   -->
+<!-- are different from the normal manual output, so don't worry that     -->
+<!-- everything is transformed again.                                     -->
+<!--                                                                      -->
+<macrodef name="offline.generic">
+    <attribute name="lang" />
+    <attribute name="style" />
+    <attribute name="dir" />
+
+    <sequential>
+        <if><available file="../index${inputext.@{lang}}" />
+        <then>
+        <echo message="building offline version (@{lang})..." />
+
+        <!-- build not-yet-translated documents -->
+        <if><not><equals arg1="@{lang}" arg2="en" /></not><then>
+            <offline.generic.loop lang="en" target="@{lang}" style="@{style}"
+                                   dir="@{dir}" />
+        </then></if>
+
+        <!-- iterate over our documents -->
+        <offline.generic.loop lang="@{lang}" target="@{lang}" style="@{style}"
+                               dir="@{dir}" />
+
+        <!-- Newline issues -->
+        <fixcrlf srcdir="../@{dir}/@{lang}" eol="lf"
+               includes="**/*.html **/*.css" />
+
+        <!-- delete undistributed files -->
+        <delete>
+            <fileset dir="../@{dir}/@{lang}"
+                includes="**/*.xml **/*${inputext.@{lang}}
+                          **/*.xml.meta
+                          style/chm style/chm/**/*
+                          style/lang style/lang/**/*
+                          style/man style/man/**/*
+                          style/w3c style/w3c/**/*
+                          style/xsl style/xsl/**/*
+                          style/zip style/zip/**/*
+                          style/latex style/latex/**/*
+                          style/*.dtd style/*.xsl style/*.xml
+                          style/_generated style/_generated/**/*
+                          style/build.properties
+                          images/apache_header*
+                          images/favicon.ico
+                          images/home* images/index*
+                          images/sub*  images/pixel*
+                          **/.*
+                         "/>
+        </delete> 
+        </then></if>
+    </sequential>
+</macrodef>
+
+<macrodef name="offline.generic.loop">
+    <attribute name="lang" />
+    <attribute name="target" />
+    <attribute name="style" />
+    <attribute name="dir" />
+
+    <sequential>
+        <for param="srcfile">
+            <path>
+                <fileset dir="../@{dir}/@{target}" includes="**/*${inputext.@{lang}}">
+                    <patternset refid="excludes" />
+                </fileset>
+            </path>
+
+            <sequential>
+                <basename property="@{srcfile}.basename" file="@{srcfile}"
+                        suffix="${inputext.@{lang}}"/>
+                <dirname  property="@{srcfile}.dirname"  file="@{srcfile}"/>
+
+                <xslt in="@{srcfile}"
+                     out="${@{srcfile}.dirname}/${@{srcfile}.basename}.html"
+                   style="../@{dir}/@{target}/style/_generated/@{style}.@{lang}.xsl"
+                   force="yes">
+                    <xmlcatalog refid="w3c-catalog" />
+                </xslt>
+            </sequential>
+        </for>
+    </sequential>
+</macrodef>
+
+<macrodef name="war.generic">
+    <attribute name="lang" />
+
+    <sequential>
+        <if><available file="../index${inputext.@{lang}}" />
+        <then>
+        <echo message="building Konqueror Web Archive package (@{lang})..." />
+
+        <!-- pack it -->
+        <delete file="${distdir}/httpd-docs-${ap.httpd.version}.@{lang}.war" />
+        <tar destfile="${distdir}/httpd-docs-${ap.httpd.version}.@{lang}.war"
+            compression="gzip">
+            <tarfileset dir="../_off/@{lang}"
+                   includes="**/*"
+                   excludes="index.rdf" />
+        </tar>
+        </then></if>
+    </sequential>
+</macrodef>
+
+<macrodef name="zip.generic">
+    <attribute name="lang" />
+
+    <sequential>
+        <if><available file="../index${inputext.@{lang}}" />
+        <then>
+        <echo message="building ZIP package (@{lang})..." />
+
+        <!-- get the current date -->
+        <tstamp>
+            <format property="maf.date.@{lang}"
+                     pattern="EEE MMM dd yyyy HH:mm:ss 'GMT-0000 (UTC)'"
+                    timezone="UTC" locale="en, US" />
+        </tstamp>
+
+        <!-- generate RDF file -->
+        <xslt in="../index${inputext.@{lang}}"
+             out="../_off/@{lang}/index.rdf"
+           style="../style/xsl/maf.xsl">
+            <param name="date" expression="${maf.date.@{lang}}" />
+            <param name="lang" expression="@{lang}" />
+        </xslt>
+
+        <!-- Newline issues -->
+        <fixcrlf srcdir="../_off/@{lang}" eol="lf"
+               includes="**/*.rdf" />
+
+        <!-- pack it -->
+        <delete file="${distdir}/httpd-docs-${ap.httpd.version}.@{lang}.maf.zip" />
+        <zip destfile="${distdir}/httpd-docs-${ap.httpd.version}.@{lang}.maf.zip"
+            compress="true"
+            encoding="ASCII">
+            <zipfileset prefix="httpd-docs-${ap.httpd.version}.@{lang}"
+                           dir="../_off/@{lang}"
+                      includes="**/*" />
+        </zip>
+        </then></if>
+    </sequential>
+</macrodef>
+
+<!-- Generation of a single latex file; for now, en only.                 -->
+<!--                                                                      -->
+<!-- You'll have to run another tool to post-process the resulting latex  -->
+<!-- files into a usable PDF file. For example pdflatex together with     -->
+<!-- sitemap.tex can be used for this: just call 'pdflatex sitemap' in    -->
+<!-- the manual dir.                                                      -->
+<!-- ==================================================================== -->
+<macrodef name="latex.generic">
+    <attribute name="lang" />
+
+    <sequential>
+        <for param="srcfile">
+            <path>
+                <fileset dir="../" includes="**/*${inputext.@{lang}}">
+                    <patternset refid="excludes" />
+                    <patternset refid="scratch" />
+                </fileset>
+            </path>
+
+            <sequential>
+                <basename property="@{srcfile}.basename" file="@{srcfile}"
+                            suffix="${inputext.@{lang}}"/>
+                <dirname  property="@{srcfile}.dirname"  file="@{srcfile}"/>
+
+                <xslt in="@{srcfile}"
+                     out="${@{srcfile}.dirname}/${@{srcfile}.basename}.tex"
+                   style="../style/latex/latex.xsl">
+                    <xmlcatalog refid="w3c-catalog" />
+                </xslt>
+            </sequential>
+        </for>
+    </sequential>
+</macrodef>
+
+</project>
diff --git a/deps.xml b/deps.xml
new file mode 100644
index 0000000..9d59fa1
--- /dev/null
+++ b/deps.xml
@@ -0,0 +1,489 @@
+<!--
+ Copyright 2003-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- this file contains dependency target(s) and will be included into    -->
+<!-- build.xml                                                            -->
+<!-- ==================================================================== -->
+<project name="deps">
+
+<!-- Create the distribution directory                                    -->
+<!--                                                                      -->
+<macrodef name="dependencies.distdir">
+    <sequential>
+        <property name="distdir" value="../_dist" />
+        <mkdir dir="${distdir}" />
+    </sequential>
+</macrodef>
+
+
+<!-- check for perl in path                                               -->
+<!--                                                                      -->
+<macrodef name="dependencies.perlcheck">
+    <sequential>
+        <exec executable="perl" failifexecutionfails="false"
+              outputproperty="perl.available">
+            <arg value="-e" />
+            <arg value="print 'yes'" />
+        </exec>
+    </sequential>
+</macrodef>
+
+
+<!-- for HTML generation -->
+<macrodef name="dependencies.html">
+  <attribute name="lang"/>
+
+  <sequential>
+    <if><available file="../mod/.translated.@{lang}" /><then>
+        <property prefix="ap.modules.@{lang}" file="../mod/.translated.@{lang}" />
+    </then></if>
+
+    <!-- mod/*.xml -> *.html.* generated from these.                      -->
+    <!-- we depend currently on the english versions (additionally),      -->
+    <!-- because they're not all translated yet                           -->
+    <dependset>
+        <srcfileset dir="../mod/"
+               includes="*.xml"
+               excludes="index.xml*
+                         *-dict.xml*
+                         *.xml.meta
+                         ${ap.modules.@{lang}.translated}" />
+
+        <targetfileset dir="../"
+                  includes="mod/index${outputext.@{lang}}
+                            mod/directives${outputext.@{lang}}
+                            mod/quickreference${outputext.@{lang}}
+                            sitemap${outputext.@{lang}}"
+                  excludes="${ap.noxml.@{lang}}" />
+    </dependset>
+    <dependset>
+        <srcfileset dir="../mod/"
+               includes="*${inputext.@{lang}}"
+               excludes="index.xml*
+                         *-dict.xml*
+                         *.xml.meta" />
+
+        <targetfileset dir="../"
+                  includes="mod/index${outputext.@{lang}}
+                            mod/directives${outputext.@{lang}}
+                            mod/quickreference${outputext.@{lang}}
+                            sitemap${outputext.@{lang}}"
+                  excludes="${ap.noxml.@{lang}}" />
+    </dependset>
+    <dependset>
+        <srcfileset    dir="../faq"
+                  includes="*.xml"
+                  excludes="index.xml*
+                            all_in_one.xml*" />
+        <targetfileset dir="../faq"
+                  includes="index${outputext.@{lang}}
+                            all_in_one${outputext.@{lang}}"
+                  excludes="${ap.noxml.@{lang}}" />
+    </dependset>
+    <dependset>
+        <srcfileset    dir="../faq"
+                  includes="*${inputext.@{lang}}"
+                  excludes="index.xml*
+                            all_in_one.xml*" />
+        <targetfileset dir="../faq"
+                  includes="index${outputext.@{lang}}
+                            all_in_one${outputext.@{lang}}"
+                  excludes="${ap.noxml.@{lang}}" />
+    </dependset>
+
+    <!-- xsl -> html.* dependencies. -->
+    <!-- all files -->
+    <dependset>
+        <srcfileset    dir="../style/"
+                  includes="manual.@{lang}.xsl
+                            xsl/common.xsl
+                            xsl/util/*.xml
+                            xsl/util/*.xsl
+                            lang/@{lang}.xml"
+                  excludes="xsl/util/designations.xml
+                            xsl/util/allmodules.xml" />
+        <targetfileset dir="../"
+                  includes="**/*${outputext.@{lang}}"
+                  excludes="${ap.noxml.@{lang}}" />
+    </dependset>
+
+    <!-- directive index -->
+    <dependset>
+        <srcfileset    dir="../style/xsl"
+                  includes="directiveindex.xsl" />
+        <targetfileset dir="../"
+                  includes="mod/directives${outputext.@{lang}}"
+                  excludes="${ap.noxml.@{lang}}" />
+    </dependset>
+
+    <!-- index page -->
+    <dependset>
+        <srcfileset    dir="../style/xsl"
+                  includes="indexpage.xsl" />
+        <targetfileset dir="../"
+                  includes="index${outputext.@{lang}}"
+                  excludes="${ap.noxml.@{lang}}" />
+    </dependset>
+
+    <!-- manual pages -->
+    <dependset>
+        <srcfileset    dir="../style/xsl/"
+                  includes="manualpage.xsl" />
+        <targetfileset dir="../"
+                  includes="**/*${outputext.@{lang}}"
+                  excludes="mod/*${outputext.@{lang}}
+                            faq/*${outputext.@{lang}}
+                            index${outputext.@{lang}}
+                            sitemap${outputext.@{lang}}
+                            ${ap.noxml.@{lang}}" />
+        <targetfileset dir="../"
+                  includes="mod/*-dict${outputext.@{lang}}"
+                  excludes="${ap.noxml.@{lang}}" />
+    </dependset>
+
+    <!-- module index -->
+    <dependset>
+        <srcfileset    dir="../style/xsl"
+                  includes="moduleindex.xsl" />
+        <targetfileset dir="../"
+                  includes="mod/index${outputext.@{lang}}"
+                  excludes="${ap.noxml.@{lang}}" />
+    </dependset>
+
+    <!-- quick reference -->
+    <dependset>
+        <srcfileset    dir="../style/xsl"
+                  includes="quickreference.xsl" />
+        <targetfileset dir="../"
+                  includes="mod/quickreference${outputext.@{lang}}"
+                  excludes="${ap.noxml.@{lang}}" />
+    </dependset>
+
+    <!-- FAQ -->
+    <dependset>
+        <srcfileset    dir="../style/xsl"
+                  includes="faq.xsl" />
+        <targetfileset dir="../"
+                  includes="faq/*${outputext.@{lang}}"
+                  excludes="${ap.noxml.@{lang}}" />
+    </dependset>
+
+    <!-- sitemap -->
+    <dependset>
+        <srcfileset    dir="../style/xsl"
+                  includes="sitemap.xsl" />
+        <targetfileset dir="../"
+                  includes="sitemap${outputext.@{lang}}"
+                  excludes="${ap.noxml.@{lang}}" />
+    </dependset>
+
+    <!-- module descriptions -->
+    <dependset>
+        <srcfileset    dir="../style/xsl"
+                  includes="synopsis.xsl" />
+        <targetfileset dir="../"
+                  includes="mod/*${outputext.@{lang}}"
+                  excludes="mod/*-dict${outputext.@{lang}}
+                            mod/index${outputext.@{lang}}
+                            mod/directives${outputext.@{lang}}
+                            mod/quickreference${outputext.@{lang}}
+                            ${ap.noxml.@{lang}}" />
+    </dependset>
+  </sequential>
+</macrodef>
+
+
+<!-- for nroff generation -->
+<macrodef name="dependencies.nroff">
+    <attribute name="lang" />
+
+    <sequential>
+        <!-- generate language specific style -->
+        <xslt in="../style/lang/@{lang}.xml"
+             out="../style/_generated/man.@{lang}.xsl"
+           style="../style/xsl/language.xsl">
+            <param name="type" expression="man" />
+        </xslt>
+
+        <!-- helper files date comparison -->
+        <copy todir="../../man" overwrite="true" preservelastmodified="true">
+            <fileset dir="../../man">
+                <include name="*.?" />
+            </fileset>
+            <mapper type="glob" from="*" to="*.tmp" />
+        </copy>
+
+        <!-- xsl => manpage dependencies. -->
+        <dependset>
+            <srcfileset    dir="../style/"
+                      includes="xsl/nroff.xsl
+                                xsl/util/*.xml
+                                lang/@{lang}.xml"
+                      excludes="xsl/util/designations.xml
+                                xsl/util/allmodules.xml" />
+            <targetfileset dir="../../man"
+                      includes="*.?"
+                      excludes="${ap.noxml.@{lang}}" />
+        </dependset>
+
+        <tstamp>
+            <format property="nroff.date" pattern="yyyy-MM-dd" timezone="UTC" />
+        </tstamp>
+    </sequential>
+</macrodef>
+
+
+<!-- for CHM generation -->
+<macrodef name="dependencies.chm">
+    <attribute name="lang" />
+
+    <sequential>
+        <!-- create distribution directory -->
+        <dependencies.distdir />
+
+        <!-- build fresh, no real dependency checking intended -->
+        <delete dir="../_chm/@{lang}" />
+
+        <!-- generate styles -->
+        <if><not><equals arg1="@{lang}" arg2="en"/></not>
+        <then>
+            <xslt in="../style/lang/en.xml"
+                 out="../style/_generated/chm.en.xsl"
+               style="../style/xsl/language.xsl">
+                <param name="type" expression="chm" />
+            </xslt>
+        </then></if>
+
+        <!-- generate language specific styles -->
+        <xslt in="../style/lang/@{lang}.xml"
+             out="../style/_generated/chm.@{lang}.xsl"
+           style="../style/xsl/language.xsl">
+            <param name="type" expression="chm" />
+        </xslt>
+        <xslt in="../style/lang/@{lang}.xml"
+             out="../style/_generated/hhc.@{lang}.xsl"
+           style="../style/xsl/language.xsl">
+            <param name="type" expression="hhc" />
+        </xslt>
+        <xslt in="../style/lang/@{lang}.xml"
+             out="../style/_generated/hhp.@{lang}.xsl"
+           style="../style/xsl/language.xsl">
+            <param name="type" expression="hhp" />
+        </xslt>
+
+        <!-- translated documents and metafiles -->
+        <copy todir="../_chm/@{lang}">
+            <fileset dir="../">
+                <depth min="0" max="1" />
+                <include name="**/*${inputext.@{lang}}" />
+                <include name="**/*.xml.meta" />
+                <include name="**/*${inputext.en}" />
+
+                <patternset refid="scratch" />
+                <patternset refid="excludes" />
+            </fileset>
+        </copy>
+        <copy todir="../_chm/@{lang}/mod">
+            <fileset dir="../mod/">
+                <include name="allmodules${inputext.@{lang}}" />
+                <include name="allmodules${inputext.en}" />
+            </fileset>
+        </copy>
+        <copy todir="../_chm/@{lang}/faq">
+            <fileset dir="../faq/">
+                <include name="categories${inputext.@{lang}}" />
+                <include name="categories${inputext.en}" />
+            </fileset>
+        </copy>
+
+        <!-- not yet translated and/or converted (en only [charset issues]) -->
+        <copy todir="../_chm/@{lang}">
+            <fileset dir="../">
+                <depth min="0" max="1" />
+                <include name="**/*${inputext.en}" />
+                <include name="**/*${outputext.en}" />
+
+                <patternset refid="scratch" />
+                <patternset refid="excludes" />
+            </fileset>
+            <mapper type="glob" from="*${outputext.en}" to="*.html" />
+        </copy>
+
+        <!-- need styles for converting -->
+        <copy todir="../_chm/@{lang}/style">
+            <fileset dir="../style" />
+        </copy>
+
+        <!-- need images ... -->
+        <copy todir="../_chm/@{lang}/images">
+            <fileset dir="../images" />
+        </copy>
+        <copy todir="../_chm/@{lang}/ssl">
+            <fileset dir="../ssl" includes="*.gif" />
+        </copy>
+    </sequential>
+</macrodef>
+
+
+<!-- for build tools package -->
+<macrodef name="dependencies.tools">
+    <sequential>
+        <!-- create distribution directory -->
+        <dependencies.distdir />
+
+        <!-- build fresh, no real dependency checking intended -->
+        <delete dir="../_tools" />
+
+        <!-- translated documents and metafiles -->
+        <copy todir="../_tools">
+            <fileset dir=".">
+                <depth min="0" max="1" />
+
+                <exclude name="**/CVS" />
+                <exclude name="**/CVS/*" />
+                <!-- exclude some special patterns -->
+                <exclude name="**/.*" />
+                <exclude name="**/*~" />
+                <exclude name="**/*.bak" />
+            </fileset>
+        </copy>
+    </sequential>
+</macrodef>
+
+
+<!-- for offline generation -->
+<macrodef name="dependencies.offline">
+    <attribute name="lang" />
+    <attribute name="dir" />
+    <attribute name="style" />
+
+    <sequential>
+        <!-- create distribution directory -->
+        <dependencies.distdir />
+
+        <!-- build fresh, no real dependency checking intended -->
+        <delete dir="../@{dir}/@{lang}" />
+
+        <!-- generate styles -->
+        <if><not><equals arg1="@{lang}" arg2="en"/></not>
+        <then>
+            <xslt in="../style/lang/en.xml"
+                 out="../style/_generated/@{style}.en.xsl"
+               style="../style/xsl/language.xsl">
+                <param name="type" expression="@{style}" />
+            </xslt>
+        </then></if>
+
+        <!-- generate language specific styles -->
+        <xslt in="../style/lang/@{lang}.xml"
+             out="../style/_generated/@{style}.@{lang}.xsl"
+           style="../style/xsl/language.xsl">
+            <param name="type" expression="@{style}" />
+        </xslt>
+
+        <!-- translated documents and metafiles -->
+        <copy todir="../@{dir}/@{lang}">
+            <fileset dir="../">
+                <depth min="0" max="1" />
+                <include name="**/*${inputext.@{lang}}" />
+                <include name="**/*.xml.meta" />
+                <include name="**/*.xml" />
+
+                <patternset refid="scratch" />
+                <patternset refid="excludes" />
+            </fileset>
+        </copy>
+        <copy todir="../@{dir}/@{lang}/mod">
+            <fileset dir="../mod/">
+                <include name="allmodules${inputext.@{lang}}" />
+                <include name="allmodules${inputext.en}" />
+            </fileset>
+        </copy>
+        <copy todir="../@{dir}/@{lang}/faq">
+            <fileset dir="../faq/">
+                <include name="categories${inputext.@{lang}}" />
+                <include name="categories${inputext.en}" />
+            </fileset>
+        </copy>
+
+        <!-- not yet translated and/or converted (en only) -->
+        <copy todir="../@{dir}/@{lang}">
+            <fileset dir="../">
+                <depth min="0" max="1" />
+                <include name="**/*${inputext.en}" />
+                <include name="**/*${outputext.en}" />
+
+                <patternset refid="scratch" />
+                <patternset refid="excludes" />
+            </fileset>
+            <mapper type="glob" from="*${outputext.en}" to="*.html" />
+        </copy>
+
+        <!-- need styles -->
+        <copy todir="../@{dir}/@{lang}/style">
+            <fileset dir="../style" />
+        </copy>
+
+        <!-- need images -->
+        <copy todir="../@{dir}/@{lang}/images">
+            <fileset dir="../images" />
+        </copy>
+        <copy todir="../@{dir}/@{lang}/ssl">
+            <fileset dir="../ssl" includes="*.gif" />
+        </copy>
+    </sequential>
+</macrodef>
+
+
+<!-- for typemap generation -->
+<macrodef name="dependencies.typemaps">
+    <sequential>
+
+        <!-- xsl => typemap dependency. -->
+        <dependset>
+            <srcfileset    dir="../style/"
+                      includes="xsl/util/*.xml
+                                xsl/typemap.xsl"
+                      excludes="xsl/util/allmodules.xml" />
+            <targetfileset dir="../"
+                      includes="**/*.html">
+                <patternset refid="scratch" />
+            </targetfileset>
+        </dependset>
+    </sequential>
+</macrodef>
+
+
+<!-- for language bootstrapping -->
+<macrodef name="dependencies.bootstrap">
+    <sequential>
+
+        <!-- xsl => style dependency. -->
+        <dependset>
+            <srcfileset    dir="../style/"
+                      includes="xsl/util/*.xml
+                                xsl/language.xsl"
+                      excludes="xsl/util/designations.xml
+                                xsl/util/allmodules.xml" />
+            <targetfileset dir="../style/"
+                      includes="manual.*.xsl
+                                xsl/util/designations.xml
+                                xsl/util/allmodules.xml" />
+        </dependset>
+    </sequential>
+</macrodef>
+
+</project>
diff --git a/lib/DocUtil.pm b/lib/DocUtil.pm
new file mode 100644
index 0000000..0725c6f
--- /dev/null
+++ b/lib/DocUtil.pm
@@ -0,0 +1,96 @@
+#!perl -w
+#
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+package DocUtil;
+use base 'Exporter';
+
+# against fat fingers
+use strict;
+use vars qw($ignore_files %suffix2lang @EXPORT_OK);
+
+use base 'Exporter';
+@EXPORT_OK = qw($ignore_files %suffix2lang docpath srcinfo prefix);
+
+# determine ignorable files
+my $ignore_ext = qr/\.(?:bak|rej|orig|meta|[^.]*~)$/i;
+my $ignore_dot = qr/^\./;
+
+$ignore_files = qr/(?:$ignore_dot)|(?:$ignore_ext)/;
+
+# translation table taken from httpd.conf:
+# (only to be used if lang != suffix)
+%suffix2lang = (
+    dk => 'da',
+    po => 'pl',
+);
+
+# compute the absolute path of a relative docpath
+use Cwd;
+use File::Spec;
+
+my $docroot = $ENV{DOCROOT};
+my ($rvol, $dir) = File::Spec->splitpath($docroot, 1);
+my @dirs = File::Spec->splitdir($dir);
+
+sub docpath(;$) {
+    my $addpath = shift;
+    $addpath = '' unless defined $addpath;
+
+    my @addpaths = grep length => split('/+' => $addpath);
+    my $file = '';
+    $file = pop @addpaths if @addpaths;
+
+    File::Spec->catpath(
+        $rvol,
+        File::Spec->catdir(@dirs, @addpaths),
+        $file
+    );
+}
+
+sub srcinfo(;$) {
+    my ($vol, $dir, $basename) = File::Spec->splitpath(shift or $ARGV[1]);
+
+    die "Call error, CWD must be the doc root directory, stopped"
+        if ($rvol ne $vol);
+        
+    my $docpath = File::Spec->abs2rel(
+        File::Spec->catpath($vol, $dir, ''),
+        $docroot
+    );
+
+    # remove suffix from basename
+    $basename =~ s/\Q$ARGV[0]\E$//;
+
+    # use HTTP path separators (/)
+    $docpath = join '/' => ('', File::Spec->splitdir($docpath), '');
+    $docpath =~ y,/,/,s; # squeeze multiple slashes
+
+    # compute relative (HTTP-)path from srcfile to docroot
+    my $relative = (join '/' => ('..') x ($docpath =~ y,/,, - 1)) || '.';
+
+    # address metafile
+    my $metafile = "$docpath$basename.xml.meta";
+
+    ($docpath, $basename, $relative, $metafile);
+}
+
+sub prefix(@) {
+    my ($vol, $dir) = File::Spec->splitpath($ARGV[1], 1);
+
+    map {File::Spec->catpath($vol, $dir, $_)} @_;
+}
+
+42;
diff --git a/lib/LICENSE b/lib/LICENSE
new file mode 100644
index 0000000..46d4329
--- /dev/null
+++ b/lib/LICENSE
@@ -0,0 +1,564 @@
+The files in this package are covered by the following licenses:
+
+
+allmodules.pl, DocUtil.pm, metafile.pl, ant.jar, ant-bootstrap.jar,
+ant-jakarta-oro.jar, ant-launcher.jar, ant-nodeps.jar, ant-trax.jar,
+../build.xml, ../deps.xml, ../prereq.xml,
+(derived from ant 1.5.3: lcp.bat, ../build.sh, ../build.bat):
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+
+ant-contrib.jar:
+
+/*
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2001-2003 Ant-Contrib project.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer. 
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:  
+ *       "This product includes software developed by the 
+ *        Ant-Contrib project (http://sourceforge.net/projects/ant-contrib)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The name Ant-Contrib must not be used to endorse or promote products 
+ *    derived from this software without prior written permission. For
+ *    written permission, please contact
+ *    ant-contrib-developers@lists.sourceforge.net.
+ *
+ * 5. Products derived from this software may not be called "Ant-Contrib"
+ *    nor may "Ant-Contrib" appear in their names without prior written
+ *    permission of the Ant-Contrib project.
+ *
+ * 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 ANT-CONTRIB PROJECT 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.
+ * ====================================================================
+ */
+
+
+jakarta-oro.jar:
+
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following 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", "Jakarta-Oro" 
+ *    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" 
+ *    or "Jakarta-Oro", nor may "Apache" or "Jakarta-Oro" 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/>.
+ */
+
+
+xalan.jar:
+
+/*
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999-2003 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 "Xalan" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written 
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    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 and was
+ * originally based on software copyright (c) 1999, Lotus
+ * Development Corporation., http://www.lotus.com.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+
+
+xercesImpl.jar, xml-apis.jar:
+
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 1999-2004 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 "Xerces" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written 
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    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 and was
+ * originally based on software copyright (c) 1999, International
+ * Business Machines, Inc., http://www.ibm.com.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+
+-------------------------------------------------------------------------------
+                            W3C IPR SOFTWARE NOTICE
+
+  Copyright © 2000 World Wide Web Consortium, (Massachusetts Institute of
+  Technology, Institut National de Recherche en Informatique et en Automatique,
+  Keio University). All Rights Reserved.
+
+   The DOM bindings are published under the W3C Software Copyright Notice
+   and License. The software license requires "Notice of any changes or
+   modifications to the W3C files, including the date changes were made."
+   Consequently, modified versions of the DOM bindings must document that
+   they do not conform to the W3C standard; in the case of the IDL
+   binding, the pragma prefix can no longer be 'w3c.org'; in the case of
+   the Java binding, the package names can no longer be in the 'org.w3c'
+   package.
+
+   Note: The original version of the W3C Software Copyright Notice and
+   License could be found at
+   [1]http://www.w3.org/Consortium/Legal/copyright-software-19980720
+
+  Copyright © 1994-2000 [2]World Wide Web Consortium, ([3]Massachusetts
+  Institute of Technology, [4]Institut National de Recherche en Informatique et
+  en Automatique, [5]Keio University). All Rights Reserved.
+  http://www.w3.org/Consortium/Legal/
+
+   This W3C work (including software, documents, or other related items)
+   is being provided by the copyright holders under the following
+   license. By obtaining, using and/or copying this work, you (the
+   licensee) agree that you have read, understood, and will comply with
+   the following terms and conditions:
+
+   Permission to use, copy, and modify this software and its
+   documentation, with or without modification,  for any purpose and
+   without fee or royalty is hereby granted, provided that you include
+   the following on ALL copies of the software and documentation or
+   portions thereof, including modifications, that you make:
+    1. The full text of this NOTICE in a location viewable to users of
+       the redistributed or derivative work.
+    2. Any pre-existing intellectual property disclaimers, notices, or
+       terms and conditions. If none exist, a short notice of the
+       following form (hypertext is preferred, text is permitted) should
+       be used within the body of any redistributed or derivative code:
+       "Copyright © [$date-of-software] [6]World Wide Web Consortium,
+       ([7]Massachusetts Institute of Technology, [8]Institut National de
+       Recherche en Informatique et en Automatique, [9]Keio University).
+       All Rights Reserved. http://www.w3.org/Consortium/Legal/"
+    3. Notice of any changes or modifications to the W3C files, including
+       the date changes were made. (We recommend you provide URIs to the
+       location from which the code is derived.)
+
+   THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
+   HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
+   INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
+   FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
+   DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
+   TRADEMARKS OR OTHER RIGHTS.
+
+   COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
+   OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
+   DOCUMENTATION.
+
+   The name and trademarks of copyright holders may NOT be used in
+   advertising or publicity pertaining to the software without specific,
+   written prior permission. Title to copyright in this software and any
+   associated documentation will at all times remain with copyright
+   holders.
+
+References:
+
+   1. http://www.w3.org/Consortium/Legal/copyright-software-19980720
+   2. http://www.w3.org/
+   3. http://www.lcs.mit.edu/
+   4. http://www.inria.fr/
+   5. http://www.keio.ac.jp/
+   6. http://www.w3.org/
+   7. http://www.lcs.mit.edu/
+   8. http://www.inria.fr/
+   9. http://www.keio.ac.jp/
+
+-------------------------------------------------------------------------------
+   SAX LICENSE
+
+   This license applies to all interfaces and classes in the org/xml/sax
+   hierarchy.
+
+     This module, both source code and documentation, is in the Public
+     Domain, and comes with NO WARRANTY. See
+     http://www.saxproject.org for further information.
+
+
+xhtml-lat1.ent, xhtml-special.ent, xhtml-symbol.ent, xhtml1-strict.dtd,
+xhtml1-transitional.dtd:
+
+                       W3C® SOFTWARE NOTICE AND LICENSE
+
+  Copyright © 1994-2002 [1]World Wide Web Consortium, ([2]Massachusetts
+  Institute of Technology, [3]Institut National de Recherche en Informatique et
+  en Automatique, [4]Keio University). All Rights Reserved.
+  http://www.w3.org/Consortium/Legal/
+
+   This W3C work (including software, documents, or other related items)
+   is being provided by the copyright holders under the following
+   license. By obtaining, using and/or copying this work, you (the
+   licensee) agree that you have read, understood, and will comply with
+   the following terms and conditions:
+
+   Permission to use, copy, modify, and distribute this software and its
+   documentation, with or without modification,  for any purpose and
+   without fee or royalty is hereby granted, provided that you include
+   the following on ALL copies of the software and documentation or
+   portions thereof, including modifications, that you make:
+    1. The full text of this NOTICE in a location viewable to users of
+       the redistributed or derivative work.
+    2. Any pre-existing intellectual property disclaimers, notices, or
+       terms and conditions. If none exist, a short notice of the
+       following form (hypertext is preferred, text is permitted) should
+       be used within the body of any redistributed or derivative code:
+       "Copyright © [$date-of-software] [5]World Wide Web Consortium,
+       ([6]Massachusetts Institute of Technology, [7]Institut National de
+       Recherche en Informatique et en Automatique, [8]Keio University).
+       All Rights Reserved. http://www.w3.org/Consortium/Legal/"
+    3. Notice of any changes or modifications to the W3C files, including
+       the date changes were made. (We recommend you provide URIs to the
+       location from which the code is derived.)
+
+   THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
+   HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
+   INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
+   FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
+   DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
+   TRADEMARKS OR OTHER RIGHTS.
+
+   COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
+   OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
+   DOCUMENTATION.
+
+   The name and trademarks of copyright holders may NOT be used in
+   advertising or publicity pertaining to the software without specific,
+   written prior permission. Title to copyright in this software and any
+   associated documentation will at all times remain with copyright
+   holders.
+
+References:
+
+   1. http://www.w3.org/
+   2. http://www.lcs.mit.edu/
+   3. http://www.inria.fr/
+   4. http://www.keio.ac.jp/
+   5. http://www.w3.org/
+   6. http://www.lcs.mit.edu/
+   7. http://www.inria.fr/
+   8. http://www.keio.ac.jp/
diff --git a/lib/NOTICE b/lib/NOTICE
new file mode 100644
index 0000000..3d08fee
--- /dev/null
+++ b/lib/NOTICE
@@ -0,0 +1,18 @@
+   =========================================================================
+   ==  NOTICE file corresponding to the section 4 d of                    ==
+   ==  the Apache License, Version 2.0,                                   ==
+   =========================================================================
+
+   This product includes software developed by
+   The Apache Software Foundation (http://www.apache.org/).
+
+   This product includes also software developed by :
+     - the W3C consortium (http://www.w3c.org) ,
+     - the SAX project (http://www.saxproject.org)
+
+   Please find the different license in the LICENSE file
+
+   The names "Ant" and  "Apache Software Foundation"  must not be used to
+   endorse  or promote  products derived  from this  software without prior
+   written permission. For written permission, please contact
+   apache@apache.org.
diff --git a/lib/README b/lib/README
new file mode 100644
index 0000000..7e2cddf
--- /dev/null
+++ b/lib/README
@@ -0,0 +1,43 @@
+This directory contains all libraries required for building the httpd
+documentation. The licenses are summarized in the LICENSE file.
+
+In particular:
+
+allmodules.pl
+    Description: maintenance script for mod/allmodules.xml*
+
+ant.jar
+ant-bootstrap.jar
+ant-jakarta-oro.jar
+ant-launcher.jar
+ant-nodeps.jar
+ant-trax.jar
+(lcp.bat)
+    Description: ant, version 1.6.1
+    URL: http://ant.apache.org/
+
+ant-contrib.jar
+    Description: ant-contrib (ant add-on), version 1.0b1
+    URL: http://sourceforge.net/projects/ant-contrib/
+
+DocUtil.pm
+    Description: utils for allmodules.pl and metafile.pl
+
+metafile.pl
+    Description: maintenance script for *.xml.meta files
+
+jakarta-oro.jar
+    Description: Regex engine (and more), Version 2.0.8
+    URL: http://jakarta.apache.org/oro/
+
+xalan.jar
+    Description: xalan (xslt processor), version 2.5.2 + patch
+    patch taken from http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24278
+      (second one:
+       http://nagoya.apache.org/bugzilla/showattachment.cgi?attach_id=9023)
+    URL: http://xml.apache.org/xalan-j/
+
+xercesImpl.jar
+xml-apis.jar
+    Description: xerces XML parser, version 2.6.2
+    URL: http://xml.apache.org/xerces2-j/
diff --git a/lib/allmodules.pl b/lib/allmodules.pl
new file mode 100644
index 0000000..f305a43
--- /dev/null
+++ b/lib/allmodules.pl
@@ -0,0 +1,181 @@
+#!perl -w
+#
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#
+# This script is intended to be called from within the docs build process.
+# It gets no parameters.
+# It assumes, that the current working directory is the root of the manual.
+
+# The script doesn't use an XML parser (yet?) so care should be taken with
+# non-ascii characters.
+
+# TODO:
+# - rewrite in java as ant task?
+
+# against fat fingers
+use strict;
+
+# for file operations
+use FindBin;
+use lib $FindBin::Bin;
+use Fcntl qw(O_RDONLY O_WRONLY O_CREAT O_TRUNC);
+use DocUtil qw(docpath $ignore_files);
+
+# Scratch stuff
+my ($ext, $curpath, @mod_files, @suffix);
+
+# get available languages automatically:
+# (a) we find out which languages the sitemap provides
+# (b) we find out which languages the module files provide
+$curpath = docpath();
+opendir(DIR, $curpath)
+    or die "could not open directory '$curpath' ($!), stopped";
+
+@suffix = map { s/^sitemap\.xml//; $_ }
+       grep !/$ignore_files/
+    => grep  /^sitemap\.xml/
+    => readdir(DIR);
+
+closedir(DIR)
+    or die "could not close directory '$curpath' ($!), stopped";
+
+# (b)
+$curpath = docpath('mod');
+opendir(DIR, $curpath)
+    or die "could not open directory '$curpath' ($!), stopped";
+
+@mod_files = grep /\.xml(?:\.[^.]+)?$/
+    => grep !/$ignore_files/
+    => readdir(DIR);
+
+closedir(DIR)
+    or die "could not close directory '$curpath' ($!), stopped";
+
+push @suffix => map { s/^(?:index|directives|quickreference)\.xml//; $_ }
+       grep /^(?:index|directives|quickreference)\.xml/
+    => @{[ @mod_files ]}; # copy, because $_ will be modified inline
+
+# keep only real module files in @mod_files
+@mod_files = grep !/^(?:index|directives|quickreference)\.xml/
+    => grep !/-dict\.xml/
+    => grep !/^allmodules\.xml/
+    => @mod_files;
+
+# now iterate over each unique extension (aka language) and check
+# (possible recreate) the particular allmodules.xml file
+for $ext (keys %{{map {($_ => undef)} @suffix}}) {
+    # the file we finally want to write to
+    my $target = docpath("mod/allmodules.xml$ext");
+
+    my @modules;
+    if (length($ext)) {
+        my %is_translated = map { s/^(.*\.xml).*/$1/; ($_ => 1) }
+               grep /\.xml\Q$ext\E$/
+            => @{[ @mod_files ]};
+
+        ## write list for dependency evaluation in build.xml
+        my $trfile = docpath("mod/.translated$ext");
+        sysopen(FILE, $trfile, O_WRONLY | O_CREAT | O_TRUNC)
+            or die "could not open '$trfile' for writing ($!), stopped";
+
+        my $content = <<"        TRFILE";
+translated=@{[
+       join " \\\n\t"
+    => sort keys %is_translated
+]}
+        TRFILE
+
+        print FILE $content
+            or die "could not write into '$trfile' ($!), stopped";
+
+        close(FILE)
+            or die "could not close '$trfile' after writing ($!), stopped";
+
+        @modules = map { $is_translated{$_} ? "$_$ext" : $_ }
+            keys %{{
+                map { s/^(.*\.xml).*/$1/; ($_ => undef) } @{[ @mod_files ]}
+            }}
+    }
+    else {
+        @modules = grep /\.xml$/ => @mod_files;
+    }
+
+    # bring in stable order for better comparison
+    @modules = sort stable_order @modules;
+
+    my $content = <<"    XML";
+<?xml version="1.0" encoding="UTF-8"?>
+
+<modulefilelist>
+  @{[ join "\n  " => map qq{<modulefile>$_</modulefile>} => @modules ]}
+</modulefilelist>
+    XML
+
+    # now load the current file and get in touch with stored reality
+    my $existing = '';
+    if (-f $target) {
+        local $/; # slurp mode
+
+        sysopen(FILE, $target, O_RDONLY)
+            or die "could not open file '$target' ($!), stopped";
+
+        $existing = <FILE>;
+
+        close(FILE)
+            or die "could not close file '$target' ($!), stopped";
+    }
+
+    # If the stored list doesn't match the computed one,
+    # replace the stored list with the computed one.
+    unless ($content eq $existing) {
+        sysopen(FILE, $target, O_WRONLY | O_CREAT | O_TRUNC)
+            or die "could not open file '$target' ($!), stopped";
+        
+        print FILE $content
+            or die "could not write into file '$target' ($!), stopped";
+
+        close(FILE)
+            or die "could not close file '$target' ($!), stopped";
+
+        # report success
+        print "'allmodules.xml$ext' written.\n";
+    }
+}
+
+# This sort callback defines a very strict but somewhat
+# "natural" sorting order
+sub stable_order {
+   return -1        if ($a =~ /^core/);
+   return  1        if ($b =~ /^core/);
+   return $a cmp $b if ($a =~ /^mod_/ and $b =~ /^mod_/);
+   return -1        if ($a =~ /^mod_/ and $b !~ /^mod_/);
+   return  1        if ($a !~ /^mod_/ and $b =~ /^mod_/);
+   (my $x = $a) =~ s/^mpmt?_//;
+   (my $y = $b) =~ s/^mpmt?_//;
+   return $x cmp $y;
+}
+
+__END__
+sample file:
+
+<?xml version="1.0" encoding="UTF-8"?>
+
+<modulefilelist>
+    <modulefile>core.xml</modulefile>
+    <modulefile>mod_actions.xml</modulefile>
+    <modulefile>mod_alias.xml</modulefile>
+    <!-- ... -->
+</modulefilelist>
diff --git a/lib/ant-bootstrap.jar b/lib/ant-bootstrap.jar
new file mode 100644
index 0000000..2fd2562
--- /dev/null
+++ b/lib/ant-bootstrap.jar
Binary files differ
diff --git a/lib/ant-contrib.jar b/lib/ant-contrib.jar
new file mode 100644
index 0000000..9b043b7
--- /dev/null
+++ b/lib/ant-contrib.jar
Binary files differ
diff --git a/lib/ant-jakarta-oro.jar b/lib/ant-jakarta-oro.jar
new file mode 100644
index 0000000..7396e8d
--- /dev/null
+++ b/lib/ant-jakarta-oro.jar
Binary files differ
diff --git a/lib/ant-launcher.jar b/lib/ant-launcher.jar
new file mode 100644
index 0000000..052fc4e
--- /dev/null
+++ b/lib/ant-launcher.jar
Binary files differ
diff --git a/lib/ant-nodeps.jar b/lib/ant-nodeps.jar
new file mode 100644
index 0000000..6bf7e7d
--- /dev/null
+++ b/lib/ant-nodeps.jar
Binary files differ
diff --git a/lib/ant-trax.jar b/lib/ant-trax.jar
new file mode 100644
index 0000000..a4b5546
--- /dev/null
+++ b/lib/ant-trax.jar
Binary files differ
diff --git a/lib/ant.jar b/lib/ant.jar
new file mode 100644
index 0000000..cf01339
--- /dev/null
+++ b/lib/ant.jar
Binary files differ
diff --git a/lib/jakarta-oro.jar b/lib/jakarta-oro.jar
new file mode 100644
index 0000000..23488d2
--- /dev/null
+++ b/lib/jakarta-oro.jar
Binary files differ
diff --git a/lib/lcp.bat b/lib/lcp.bat
new file mode 100644
index 0000000..ffe0532
--- /dev/null
+++ b/lib/lcp.bat
@@ -0,0 +1,16 @@
+REM   Copyright (c) 2001-2004 The Apache Software Foundation.  All rights
+REM   reserved.
+
+set _CLASSPATHCOMPONENT=%1
+if ""%1""=="""" goto gotAllArgs
+shift
+
+:argCheck
+if ""%1""=="""" goto gotAllArgs
+set _CLASSPATHCOMPONENT=%_CLASSPATHCOMPONENT% %1
+shift
+goto argCheck
+
+:gotAllArgs
+set LOCALCLASSPATH=%_CLASSPATHCOMPONENT%;%LOCALCLASSPATH%
+
diff --git a/lib/metafile.pl b/lib/metafile.pl
new file mode 100644
index 0000000..06301d2
--- /dev/null
+++ b/lib/metafile.pl
@@ -0,0 +1,274 @@
+#!perl -w
+#
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#
+# This script is intended to be called from within the docs build process.
+# It gets two parameters, ${input_ext} (e.g. .xml.de) and the full path name
+# of the current directory.
+# It assumes, that the current working directory is the root of the manual.
+
+# The script doesn't use an XML parser (yet?) so care should be taken with
+# non-ascii characters.
+
+# TODO:
+# - rewrite in java as ant task?
+
+# against fat fingers
+use strict;
+
+# for file operations
+use FindBin;
+use lib $FindBin::Bin;
+use Fcntl qw(O_RDONLY O_WRONLY O_CREAT O_TRUNC O_APPEND);
+use DocUtil qw(%suffix2lang $ignore_files srcinfo docpath prefix);
+sub outofdate($$$); # need Prototype
+
+# scratch stuff
+my (@files, @all_files, @pfiles, %revs, $curpath, $file);
+
+# check commandline parameters
+die "missing parameter(s)\n"
+    unless defined $ARGV[0] and defined $ARGV[1];
+    #              suffix               srcfile
+
+# slurp in directory
+$curpath = $ARGV[1];
+opendir(DIR, $curpath)
+    or die "could not open directory '$curpath' ($!), stopped";
+
+@all_files = sort grep {
+    $_ ne "allmodules$ARGV[0]" and
+    $_ ne "categories$ARGV[0]"
+} grep !/$ignore_files/ => readdir(DIR);
+
+closedir(DIR)
+    or die "could not close directory '$curpath' ($!), stopped";
+
+# glob the files
+@files = grep {-f $_} prefix grep /\Q$ARGV[0]\E$/ => @all_files;
+
+for $file (@files) {
+    my (%current, %variants);
+    my ($dirname, $basename, $relative, $metafile) = srcinfo($file);
+
+    # first determine the reality
+    @pfiles = grep /^\Q$basename.\E(?:html\.[^.]+|xml)/ => @all_files;
+
+    # now loop over the filelist.
+    # it contains all files of one language including
+    # html AND xml variants.
+    for (@pfiles) {
+        my $suffix;
+        my $lang = $suffix = /^\Q$basename.\E(?:html|xml)\.([^.]+)/ ? $1 : 'en';
+        $lang = $suffix2lang{$suffix} if $suffix2lang{$suffix};
+
+        $variants{$lang} = {};
+        $variants{$lang}->{'pdf'} = "$basename.$suffix.pdf"
+            if -f docpath("$dirname$basename.$suffix.pdf");
+
+        # the following works, because the list (@pfiles) is sorted, that way
+        # html is processed before xml and thus typically we set the
+        # parameter first and delete it later.
+        if (/^\Q$basename.xml/) {
+            delete $variants{$lang}->{'htmlonly'};
+        }
+        else {
+            $variants{$lang}->{'htmlonly'} = 'yes';
+        }
+
+        $variants{$lang}->{outdated} = 'yes'
+            if $lang ne 'en' and outofdate($dirname, $basename, $lang);
+    }
+
+    # create resulting file contents
+    my $content = <<"    XML";
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<metafile>
+  <basename>$basename</basename>
+  <path>$dirname</path>
+  <relpath>$relative</relpath>
+
+  <variants>
+    @{[
+        join "\n    "
+        => map
+            qq{<variant@{[do{ my $lang = $_;
+                map qq( $_="$variants{$lang}->{$_}")
+                => keys %{$variants{$lang}};
+            }]}>$_</variant>}
+        => sort keys %variants
+    ]}
+  </variants>
+</metafile>
+    XML
+
+    # read current variant file if exists
+    my $existing = '';
+    $curpath = docpath($metafile);
+    if (-f $curpath) {
+        local $/; # slurp mode /
+
+        sysopen(FILE, $curpath, O_RDONLY)
+            or die "could not open file '$curpath' ($!), stopped";
+
+        $existing = <FILE>;
+
+        close(FILE)
+            or die "could not close file '$curpath' ($!), stopped";
+    }
+
+    # compare and possibly write new result to disk
+    unless ($content eq $existing) {
+        my $ppath = $metafile;
+        $ppath =~ s,^/,,;
+
+        sysopen(FILE, $curpath, O_WRONLY | O_CREAT | O_TRUNC)
+            or die "could not open file '$curpath' ($!), stopped";
+
+        print FILE $content
+            or die "could not write into file '$curpath' ($!), stopped";
+
+        close(FILE)
+            or die "could not close file '$curpath' ($!), stopped";
+
+        # report success
+        print "'$ppath' written.\n";
+    }
+} # for (@files)
+
+# get revision of the english original
+sub reven($$) {
+    my $dirname = shift;
+    my $basename = shift;
+    my $rev = $revs{"$dirname$basename"};
+
+    unless ($rev) {
+        my $curpath = docpath("$dirname$basename.xml");
+
+        sysopen(FILE, $curpath, O_RDONLY)
+            or die "could not open file '$curpath' ($!), stopped";
+
+        {
+            local $_;
+            while (<FILE>) {
+                $rev = $1, last if /<!-- \044LastChangedRevision:\s*(\S+)\s*\$ -->/;
+            }
+        }
+
+        close(FILE)
+            or die "could not close file '$curpath' ($!), stopped";
+
+        $revs{"$dirname$basename"} = $rev;
+    }
+
+    return $rev;
+}
+
+# check out-of-dateness of a file
+sub outofdate($$$) {
+    my $dirname = shift;
+    my $basename = shift;
+    my $lang = shift;
+
+    if (/^\Q$basename.xml/) {
+        my $ood = 0;
+        my $reven = reven($dirname, $basename);
+
+        if ($reven) {
+            my $curpath = docpath("$dirname$_");
+            my ($rev, $orev);
+
+            # grab the revision info from the source file
+            sysopen(FILE, $curpath, O_RDONLY)
+                or die "could not open file '$curpath' ($!), stopped";
+            {
+                local $_;
+                while (<FILE>) {
+                    $rev = $1, $orev=$2, last
+                        if /<!--\s*English\s+Revision:\s*(\S+)\s+
+                            (?:\(outdated:\s*(\S+)\s*\)\s+)?-->/xi;
+                }
+            }
+            close(FILE)
+                or die "could not close file '$curpath' ($!), stopped";
+
+            # if outdated, take some action
+            if ($rev and $rev ne $reven) {
+                # note the actual revision in the source file
+                unless ($orev and $orev eq $reven) {
+                    my $cont;
+                    sysopen(FILE, $curpath, O_RDONLY)
+                        or die "could not open file '$curpath' ($!), stopped";
+                    {
+                        local $/; # slurp mode
+                        $cont = <FILE>;
+                    }
+                    close(FILE)
+                        or die "could not close file '$curpath' ($!), stopped";
+
+                    $cont =~ s{<!--\s*English\s+Revision:\s*(\S+)\s+
+                               (?:\(outdated[^)]*\)\s+)?-->}
+                        {<!-- English Revision: $1 (outdated: $reven) -->}ix;
+
+                    sysopen(FILE, "$curpath.tmp", O_WRONLY | O_CREAT | O_TRUNC)
+                        or die "could not open file '$curpath.tmp' ($!), stopped";
+                    print FILE $cont
+                        or die "could write file '$curpath.tmp' ($!), stopped";
+                    close(FILE)
+                        or die "could not close file '$curpath.tmp' ($!), stopped";
+
+                    rename "$curpath.tmp", $curpath
+                        or die "could not rename $curpath.tmp -> $curpath ".
+                               "($!), stopped";
+
+                    print substr($dirname, 1), $_, " adjusted (refers to: ",
+                          $rev, ", current is: $reven)\n";
+                }
+
+                # record the filename for later output on the terminal
+                $curpath = docpath(".outdated.$lang");
+                sysopen(FILE, $curpath, O_WRONLY | O_CREAT | O_APPEND)
+                    or die "could not open file '$curpath' ($!), stopped";
+
+                print FILE substr("$dirname$_\n", 1);
+
+                close(FILE)
+                    or die "could not close file '$curpath' ($!), stopped";
+
+                return 23; # true, soo true.
+            }
+        }
+    }
+
+    return;
+}
+
+__END__
+sample file:
+
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<metafile>
+  <basename>quickreference</basename>
+  <path>/mod/</path>
+  <relpath>..</relpath>
+
+  <variants>
+    <variant pdf="quickreference.en.pdf">en</variant>
+    <variant outdated="yes">ja</variant>
+  </variants>
+</metafile>
diff --git a/lib/xalan.jar b/lib/xalan.jar
new file mode 100644
index 0000000..5260d22
--- /dev/null
+++ b/lib/xalan.jar
Binary files differ
diff --git a/lib/xercesImpl.jar b/lib/xercesImpl.jar
new file mode 100644
index 0000000..f0fb0e8
--- /dev/null
+++ b/lib/xercesImpl.jar
Binary files differ
diff --git a/lib/xhtml-lat1.ent b/lib/xhtml-lat1.ent
new file mode 100644
index 0000000..ffee223
--- /dev/null
+++ b/lib/xhtml-lat1.ent
@@ -0,0 +1,196 @@
+<!-- Portions (C) International Organization for Standardization 1986
+     Permission to copy in any form is granted for use with
+     conforming SGML systems and applications as defined in
+     ISO 8879, provided this notice is included in all copies.
+-->
+<!-- Character entity set. Typical invocation:
+    <!ENTITY % HTMLlat1 PUBLIC
+       "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+       "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
+    %HTMLlat1;
+-->
+
+<!ENTITY nbsp   "&#160;"> <!-- no-break space = non-breaking space,
+                                  U+00A0 ISOnum -->
+<!ENTITY iexcl  "&#161;"> <!-- inverted exclamation mark, U+00A1 ISOnum -->
+<!ENTITY cent   "&#162;"> <!-- cent sign, U+00A2 ISOnum -->
+<!ENTITY pound  "&#163;"> <!-- pound sign, U+00A3 ISOnum -->
+<!ENTITY curren "&#164;"> <!-- currency sign, U+00A4 ISOnum -->
+<!ENTITY yen    "&#165;"> <!-- yen sign = yuan sign, U+00A5 ISOnum -->
+<!ENTITY brvbar "&#166;"> <!-- broken bar = broken vertical bar,
+                                  U+00A6 ISOnum -->
+<!ENTITY sect   "&#167;"> <!-- section sign, U+00A7 ISOnum -->
+<!ENTITY uml    "&#168;"> <!-- diaeresis = spacing diaeresis,
+                                  U+00A8 ISOdia -->
+<!ENTITY copy   "&#169;"> <!-- copyright sign, U+00A9 ISOnum -->
+<!ENTITY ordf   "&#170;"> <!-- feminine ordinal indicator, U+00AA ISOnum -->
+<!ENTITY laquo  "&#171;"> <!-- left-pointing double angle quotation mark
+                                  = left pointing guillemet, U+00AB ISOnum -->
+<!ENTITY not    "&#172;"> <!-- not sign = angled dash,
+                                  U+00AC ISOnum -->
+<!ENTITY shy    "&#173;"> <!-- soft hyphen = discretionary hyphen,
+                                  U+00AD ISOnum -->
+<!ENTITY reg    "&#174;"> <!-- registered sign = registered trade mark sign,
+                                  U+00AE ISOnum -->
+<!ENTITY macr   "&#175;"> <!-- macron = spacing macron = overline
+                                  = APL overbar, U+00AF ISOdia -->
+<!ENTITY deg    "&#176;"> <!-- degree sign, U+00B0 ISOnum -->
+<!ENTITY plusmn "&#177;"> <!-- plus-minus sign = plus-or-minus sign,
+                                  U+00B1 ISOnum -->
+<!ENTITY sup2   "&#178;"> <!-- superscript two = superscript digit two
+                                  = squared, U+00B2 ISOnum -->
+<!ENTITY sup3   "&#179;"> <!-- superscript three = superscript digit three
+                                  = cubed, U+00B3 ISOnum -->
+<!ENTITY acute  "&#180;"> <!-- acute accent = spacing acute,
+                                  U+00B4 ISOdia -->
+<!ENTITY micro  "&#181;"> <!-- micro sign, U+00B5 ISOnum -->
+<!ENTITY para   "&#182;"> <!-- pilcrow sign = paragraph sign,
+                                  U+00B6 ISOnum -->
+<!ENTITY middot "&#183;"> <!-- middle dot = Georgian comma
+                                  = Greek middle dot, U+00B7 ISOnum -->
+<!ENTITY cedil  "&#184;"> <!-- cedilla = spacing cedilla, U+00B8 ISOdia -->
+<!ENTITY sup1   "&#185;"> <!-- superscript one = superscript digit one,
+                                  U+00B9 ISOnum -->
+<!ENTITY ordm   "&#186;"> <!-- masculine ordinal indicator,
+                                  U+00BA ISOnum -->
+<!ENTITY raquo  "&#187;"> <!-- right-pointing double angle quotation mark
+                                  = right pointing guillemet, U+00BB ISOnum -->
+<!ENTITY frac14 "&#188;"> <!-- vulgar fraction one quarter
+                                  = fraction one quarter, U+00BC ISOnum -->
+<!ENTITY frac12 "&#189;"> <!-- vulgar fraction one half
+                                  = fraction one half, U+00BD ISOnum -->
+<!ENTITY frac34 "&#190;"> <!-- vulgar fraction three quarters
+                                  = fraction three quarters, U+00BE ISOnum -->
+<!ENTITY iquest "&#191;"> <!-- inverted question mark
+                                  = turned question mark, U+00BF ISOnum -->
+<!ENTITY Agrave "&#192;"> <!-- latin capital letter A with grave
+                                  = latin capital letter A grave,
+                                  U+00C0 ISOlat1 -->
+<!ENTITY Aacute "&#193;"> <!-- latin capital letter A with acute,
+                                  U+00C1 ISOlat1 -->
+<!ENTITY Acirc  "&#194;"> <!-- latin capital letter A with circumflex,
+                                  U+00C2 ISOlat1 -->
+<!ENTITY Atilde "&#195;"> <!-- latin capital letter A with tilde,
+                                  U+00C3 ISOlat1 -->
+<!ENTITY Auml   "&#196;"> <!-- latin capital letter A with diaeresis,
+                                  U+00C4 ISOlat1 -->
+<!ENTITY Aring  "&#197;"> <!-- latin capital letter A with ring above
+                                  = latin capital letter A ring,
+                                  U+00C5 ISOlat1 -->
+<!ENTITY AElig  "&#198;"> <!-- latin capital letter AE
+                                  = latin capital ligature AE,
+                                  U+00C6 ISOlat1 -->
+<!ENTITY Ccedil "&#199;"> <!-- latin capital letter C with cedilla,
+                                  U+00C7 ISOlat1 -->
+<!ENTITY Egrave "&#200;"> <!-- latin capital letter E with grave,
+                                  U+00C8 ISOlat1 -->
+<!ENTITY Eacute "&#201;"> <!-- latin capital letter E with acute,
+                                  U+00C9 ISOlat1 -->
+<!ENTITY Ecirc  "&#202;"> <!-- latin capital letter E with circumflex,
+                                  U+00CA ISOlat1 -->
+<!ENTITY Euml   "&#203;"> <!-- latin capital letter E with diaeresis,
+                                  U+00CB ISOlat1 -->
+<!ENTITY Igrave "&#204;"> <!-- latin capital letter I with grave,
+                                  U+00CC ISOlat1 -->
+<!ENTITY Iacute "&#205;"> <!-- latin capital letter I with acute,
+                                  U+00CD ISOlat1 -->
+<!ENTITY Icirc  "&#206;"> <!-- latin capital letter I with circumflex,
+                                  U+00CE ISOlat1 -->
+<!ENTITY Iuml   "&#207;"> <!-- latin capital letter I with diaeresis,
+                                  U+00CF ISOlat1 -->
+<!ENTITY ETH    "&#208;"> <!-- latin capital letter ETH, U+00D0 ISOlat1 -->
+<!ENTITY Ntilde "&#209;"> <!-- latin capital letter N with tilde,
+                                  U+00D1 ISOlat1 -->
+<!ENTITY Ograve "&#210;"> <!-- latin capital letter O with grave,
+                                  U+00D2 ISOlat1 -->
+<!ENTITY Oacute "&#211;"> <!-- latin capital letter O with acute,
+                                  U+00D3 ISOlat1 -->
+<!ENTITY Ocirc  "&#212;"> <!-- latin capital letter O with circumflex,
+                                  U+00D4 ISOlat1 -->
+<!ENTITY Otilde "&#213;"> <!-- latin capital letter O with tilde,
+                                  U+00D5 ISOlat1 -->
+<!ENTITY Ouml   "&#214;"> <!-- latin capital letter O with diaeresis,
+                                  U+00D6 ISOlat1 -->
+<!ENTITY times  "&#215;"> <!-- multiplication sign, U+00D7 ISOnum -->
+<!ENTITY Oslash "&#216;"> <!-- latin capital letter O with stroke
+                                  = latin capital letter O slash,
+                                  U+00D8 ISOlat1 -->
+<!ENTITY Ugrave "&#217;"> <!-- latin capital letter U with grave,
+                                  U+00D9 ISOlat1 -->
+<!ENTITY Uacute "&#218;"> <!-- latin capital letter U with acute,
+                                  U+00DA ISOlat1 -->
+<!ENTITY Ucirc  "&#219;"> <!-- latin capital letter U with circumflex,
+                                  U+00DB ISOlat1 -->
+<!ENTITY Uuml   "&#220;"> <!-- latin capital letter U with diaeresis,
+                                  U+00DC ISOlat1 -->
+<!ENTITY Yacute "&#221;"> <!-- latin capital letter Y with acute,
+                                  U+00DD ISOlat1 -->
+<!ENTITY THORN  "&#222;"> <!-- latin capital letter THORN,
+                                  U+00DE ISOlat1 -->
+<!ENTITY szlig  "&#223;"> <!-- latin small letter sharp s = ess-zed,
+                                  U+00DF ISOlat1 -->
+<!ENTITY agrave "&#224;"> <!-- latin small letter a with grave
+                                  = latin small letter a grave,
+                                  U+00E0 ISOlat1 -->
+<!ENTITY aacute "&#225;"> <!-- latin small letter a with acute,
+                                  U+00E1 ISOlat1 -->
+<!ENTITY acirc  "&#226;"> <!-- latin small letter a with circumflex,
+                                  U+00E2 ISOlat1 -->
+<!ENTITY atilde "&#227;"> <!-- latin small letter a with tilde,
+                                  U+00E3 ISOlat1 -->
+<!ENTITY auml   "&#228;"> <!-- latin small letter a with diaeresis,
+                                  U+00E4 ISOlat1 -->
+<!ENTITY aring  "&#229;"> <!-- latin small letter a with ring above
+                                  = latin small letter a ring,
+                                  U+00E5 ISOlat1 -->
+<!ENTITY aelig  "&#230;"> <!-- latin small letter ae
+                                  = latin small ligature ae, U+00E6 ISOlat1 -->
+<!ENTITY ccedil "&#231;"> <!-- latin small letter c with cedilla,
+                                  U+00E7 ISOlat1 -->
+<!ENTITY egrave "&#232;"> <!-- latin small letter e with grave,
+                                  U+00E8 ISOlat1 -->
+<!ENTITY eacute "&#233;"> <!-- latin small letter e with acute,
+                                  U+00E9 ISOlat1 -->
+<!ENTITY ecirc  "&#234;"> <!-- latin small letter e with circumflex,
+                                  U+00EA ISOlat1 -->
+<!ENTITY euml   "&#235;"> <!-- latin small letter e with diaeresis,
+                                  U+00EB ISOlat1 -->
+<!ENTITY igrave "&#236;"> <!-- latin small letter i with grave,
+                                  U+00EC ISOlat1 -->
+<!ENTITY iacute "&#237;"> <!-- latin small letter i with acute,
+                                  U+00ED ISOlat1 -->
+<!ENTITY icirc  "&#238;"> <!-- latin small letter i with circumflex,
+                                  U+00EE ISOlat1 -->
+<!ENTITY iuml   "&#239;"> <!-- latin small letter i with diaeresis,
+                                  U+00EF ISOlat1 -->
+<!ENTITY eth    "&#240;"> <!-- latin small letter eth, U+00F0 ISOlat1 -->
+<!ENTITY ntilde "&#241;"> <!-- latin small letter n with tilde,
+                                  U+00F1 ISOlat1 -->
+<!ENTITY ograve "&#242;"> <!-- latin small letter o with grave,
+                                  U+00F2 ISOlat1 -->
+<!ENTITY oacute "&#243;"> <!-- latin small letter o with acute,
+                                  U+00F3 ISOlat1 -->
+<!ENTITY ocirc  "&#244;"> <!-- latin small letter o with circumflex,
+                                  U+00F4 ISOlat1 -->
+<!ENTITY otilde "&#245;"> <!-- latin small letter o with tilde,
+                                  U+00F5 ISOlat1 -->
+<!ENTITY ouml   "&#246;"> <!-- latin small letter o with diaeresis,
+                                  U+00F6 ISOlat1 -->
+<!ENTITY divide "&#247;"> <!-- division sign, U+00F7 ISOnum -->
+<!ENTITY oslash "&#248;"> <!-- latin small letter o with stroke,
+                                  = latin small letter o slash,
+                                  U+00F8 ISOlat1 -->
+<!ENTITY ugrave "&#249;"> <!-- latin small letter u with grave,
+                                  U+00F9 ISOlat1 -->
+<!ENTITY uacute "&#250;"> <!-- latin small letter u with acute,
+                                  U+00FA ISOlat1 -->
+<!ENTITY ucirc  "&#251;"> <!-- latin small letter u with circumflex,
+                                  U+00FB ISOlat1 -->
+<!ENTITY uuml   "&#252;"> <!-- latin small letter u with diaeresis,
+                                  U+00FC ISOlat1 -->
+<!ENTITY yacute "&#253;"> <!-- latin small letter y with acute,
+                                  U+00FD ISOlat1 -->
+<!ENTITY thorn  "&#254;"> <!-- latin small letter thorn,
+                                  U+00FE ISOlat1 -->
+<!ENTITY yuml   "&#255;"> <!-- latin small letter y with diaeresis,
+                                  U+00FF ISOlat1 -->
diff --git a/lib/xhtml-special.ent b/lib/xhtml-special.ent
new file mode 100644
index 0000000..ca358b2
--- /dev/null
+++ b/lib/xhtml-special.ent
@@ -0,0 +1,80 @@
+<!-- Special characters for XHTML -->
+
+<!-- Character entity set. Typical invocation:
+     <!ENTITY % HTMLspecial PUBLIC
+        "-//W3C//ENTITIES Special for XHTML//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
+     %HTMLspecial;
+-->
+
+<!-- Portions (C) International Organization for Standardization 1986:
+     Permission to copy in any form is granted for use with
+     conforming SGML systems and applications as defined in
+     ISO 8879, provided this notice is included in all copies.
+-->
+
+<!-- Relevant ISO entity set is given unless names are newly introduced.
+     New names (i.e., not in ISO 8879 list) do not clash with any
+     existing ISO 8879 entity names. ISO 10646 character numbers
+     are given for each character, in hex. values are decimal
+     conversions of the ISO 10646 values and refer to the document
+     character set. Names are Unicode names. 
+-->
+
+<!-- C0 Controls and Basic Latin -->
+<!ENTITY quot    "&#34;"> <!--  quotation mark, U+0022 ISOnum -->
+<!ENTITY amp     "&#38;#38;"> <!--  ampersand, U+0026 ISOnum -->
+<!ENTITY lt      "&#38;#60;"> <!--  less-than sign, U+003C ISOnum -->
+<!ENTITY gt      "&#62;"> <!--  greater-than sign, U+003E ISOnum -->
+<!ENTITY apos	 "&#39;"> <!--  apostrophe = APL quote, U+0027 ISOnum -->
+
+<!-- Latin Extended-A -->
+<!ENTITY OElig   "&#338;"> <!--  latin capital ligature OE,
+                                    U+0152 ISOlat2 -->
+<!ENTITY oelig   "&#339;"> <!--  latin small ligature oe, U+0153 ISOlat2 -->
+<!-- ligature is a misnomer, this is a separate character in some languages -->
+<!ENTITY Scaron  "&#352;"> <!--  latin capital letter S with caron,
+                                    U+0160 ISOlat2 -->
+<!ENTITY scaron  "&#353;"> <!--  latin small letter s with caron,
+                                    U+0161 ISOlat2 -->
+<!ENTITY Yuml    "&#376;"> <!--  latin capital letter Y with diaeresis,
+                                    U+0178 ISOlat2 -->
+
+<!-- Spacing Modifier Letters -->
+<!ENTITY circ    "&#710;"> <!--  modifier letter circumflex accent,
+                                    U+02C6 ISOpub -->
+<!ENTITY tilde   "&#732;"> <!--  small tilde, U+02DC ISOdia -->
+
+<!-- General Punctuation -->
+<!ENTITY ensp    "&#8194;"> <!-- en space, U+2002 ISOpub -->
+<!ENTITY emsp    "&#8195;"> <!-- em space, U+2003 ISOpub -->
+<!ENTITY thinsp  "&#8201;"> <!-- thin space, U+2009 ISOpub -->
+<!ENTITY zwnj    "&#8204;"> <!-- zero width non-joiner,
+                                    U+200C NEW RFC 2070 -->
+<!ENTITY zwj     "&#8205;"> <!-- zero width joiner, U+200D NEW RFC 2070 -->
+<!ENTITY lrm     "&#8206;"> <!-- left-to-right mark, U+200E NEW RFC 2070 -->
+<!ENTITY rlm     "&#8207;"> <!-- right-to-left mark, U+200F NEW RFC 2070 -->
+<!ENTITY ndash   "&#8211;"> <!-- en dash, U+2013 ISOpub -->
+<!ENTITY mdash   "&#8212;"> <!-- em dash, U+2014 ISOpub -->
+<!ENTITY lsquo   "&#8216;"> <!-- left single quotation mark,
+                                    U+2018 ISOnum -->
+<!ENTITY rsquo   "&#8217;"> <!-- right single quotation mark,
+                                    U+2019 ISOnum -->
+<!ENTITY sbquo   "&#8218;"> <!-- single low-9 quotation mark, U+201A NEW -->
+<!ENTITY ldquo   "&#8220;"> <!-- left double quotation mark,
+                                    U+201C ISOnum -->
+<!ENTITY rdquo   "&#8221;"> <!-- right double quotation mark,
+                                    U+201D ISOnum -->
+<!ENTITY bdquo   "&#8222;"> <!-- double low-9 quotation mark, U+201E NEW -->
+<!ENTITY dagger  "&#8224;"> <!-- dagger, U+2020 ISOpub -->
+<!ENTITY Dagger  "&#8225;"> <!-- double dagger, U+2021 ISOpub -->
+<!ENTITY permil  "&#8240;"> <!-- per mille sign, U+2030 ISOtech -->
+<!ENTITY lsaquo  "&#8249;"> <!-- single left-pointing angle quotation mark,
+                                    U+2039 ISO proposed -->
+<!-- lsaquo is proposed but not yet ISO standardized -->
+<!ENTITY rsaquo  "&#8250;"> <!-- single right-pointing angle quotation mark,
+                                    U+203A ISO proposed -->
+<!-- rsaquo is proposed but not yet ISO standardized -->
+
+<!-- Currency Symbols -->
+<!ENTITY euro   "&#8364;"> <!--  euro sign, U+20AC NEW -->
diff --git a/lib/xhtml-symbol.ent b/lib/xhtml-symbol.ent
new file mode 100644
index 0000000..63c2abf
--- /dev/null
+++ b/lib/xhtml-symbol.ent
@@ -0,0 +1,237 @@
+<!-- Mathematical, Greek and Symbolic characters for XHTML -->
+
+<!-- Character entity set. Typical invocation:
+     <!ENTITY % HTMLsymbol PUBLIC
+        "-//W3C//ENTITIES Symbols for XHTML//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">
+     %HTMLsymbol;
+-->
+
+<!-- Portions (C) International Organization for Standardization 1986:
+     Permission to copy in any form is granted for use with
+     conforming SGML systems and applications as defined in
+     ISO 8879, provided this notice is included in all copies.
+-->
+
+<!-- Relevant ISO entity set is given unless names are newly introduced.
+     New names (i.e., not in ISO 8879 list) do not clash with any
+     existing ISO 8879 entity names. ISO 10646 character numbers
+     are given for each character, in hex. values are decimal
+     conversions of the ISO 10646 values and refer to the document
+     character set. Names are Unicode names. 
+-->
+
+<!-- Latin Extended-B -->
+<!ENTITY fnof     "&#402;"> <!-- latin small letter f with hook = function
+                                    = florin, U+0192 ISOtech -->
+
+<!-- Greek -->
+<!ENTITY Alpha    "&#913;"> <!-- greek capital letter alpha, U+0391 -->
+<!ENTITY Beta     "&#914;"> <!-- greek capital letter beta, U+0392 -->
+<!ENTITY Gamma    "&#915;"> <!-- greek capital letter gamma,
+                                    U+0393 ISOgrk3 -->
+<!ENTITY Delta    "&#916;"> <!-- greek capital letter delta,
+                                    U+0394 ISOgrk3 -->
+<!ENTITY Epsilon  "&#917;"> <!-- greek capital letter epsilon, U+0395 -->
+<!ENTITY Zeta     "&#918;"> <!-- greek capital letter zeta, U+0396 -->
+<!ENTITY Eta      "&#919;"> <!-- greek capital letter eta, U+0397 -->
+<!ENTITY Theta    "&#920;"> <!-- greek capital letter theta,
+                                    U+0398 ISOgrk3 -->
+<!ENTITY Iota     "&#921;"> <!-- greek capital letter iota, U+0399 -->
+<!ENTITY Kappa    "&#922;"> <!-- greek capital letter kappa, U+039A -->
+<!ENTITY Lambda   "&#923;"> <!-- greek capital letter lamda,
+                                    U+039B ISOgrk3 -->
+<!ENTITY Mu       "&#924;"> <!-- greek capital letter mu, U+039C -->
+<!ENTITY Nu       "&#925;"> <!-- greek capital letter nu, U+039D -->
+<!ENTITY Xi       "&#926;"> <!-- greek capital letter xi, U+039E ISOgrk3 -->
+<!ENTITY Omicron  "&#927;"> <!-- greek capital letter omicron, U+039F -->
+<!ENTITY Pi       "&#928;"> <!-- greek capital letter pi, U+03A0 ISOgrk3 -->
+<!ENTITY Rho      "&#929;"> <!-- greek capital letter rho, U+03A1 -->
+<!-- there is no Sigmaf, and no U+03A2 character either -->
+<!ENTITY Sigma    "&#931;"> <!-- greek capital letter sigma,
+                                    U+03A3 ISOgrk3 -->
+<!ENTITY Tau      "&#932;"> <!-- greek capital letter tau, U+03A4 -->
+<!ENTITY Upsilon  "&#933;"> <!-- greek capital letter upsilon,
+                                    U+03A5 ISOgrk3 -->
+<!ENTITY Phi      "&#934;"> <!-- greek capital letter phi,
+                                    U+03A6 ISOgrk3 -->
+<!ENTITY Chi      "&#935;"> <!-- greek capital letter chi, U+03A7 -->
+<!ENTITY Psi      "&#936;"> <!-- greek capital letter psi,
+                                    U+03A8 ISOgrk3 -->
+<!ENTITY Omega    "&#937;"> <!-- greek capital letter omega,
+                                    U+03A9 ISOgrk3 -->
+
+<!ENTITY alpha    "&#945;"> <!-- greek small letter alpha,
+                                    U+03B1 ISOgrk3 -->
+<!ENTITY beta     "&#946;"> <!-- greek small letter beta, U+03B2 ISOgrk3 -->
+<!ENTITY gamma    "&#947;"> <!-- greek small letter gamma,
+                                    U+03B3 ISOgrk3 -->
+<!ENTITY delta    "&#948;"> <!-- greek small letter delta,
+                                    U+03B4 ISOgrk3 -->
+<!ENTITY epsilon  "&#949;"> <!-- greek small letter epsilon,
+                                    U+03B5 ISOgrk3 -->
+<!ENTITY zeta     "&#950;"> <!-- greek small letter zeta, U+03B6 ISOgrk3 -->
+<!ENTITY eta      "&#951;"> <!-- greek small letter eta, U+03B7 ISOgrk3 -->
+<!ENTITY theta    "&#952;"> <!-- greek small letter theta,
+                                    U+03B8 ISOgrk3 -->
+<!ENTITY iota     "&#953;"> <!-- greek small letter iota, U+03B9 ISOgrk3 -->
+<!ENTITY kappa    "&#954;"> <!-- greek small letter kappa,
+                                    U+03BA ISOgrk3 -->
+<!ENTITY lambda   "&#955;"> <!-- greek small letter lamda,
+                                    U+03BB ISOgrk3 -->
+<!ENTITY mu       "&#956;"> <!-- greek small letter mu, U+03BC ISOgrk3 -->
+<!ENTITY nu       "&#957;"> <!-- greek small letter nu, U+03BD ISOgrk3 -->
+<!ENTITY xi       "&#958;"> <!-- greek small letter xi, U+03BE ISOgrk3 -->
+<!ENTITY omicron  "&#959;"> <!-- greek small letter omicron, U+03BF NEW -->
+<!ENTITY pi       "&#960;"> <!-- greek small letter pi, U+03C0 ISOgrk3 -->
+<!ENTITY rho      "&#961;"> <!-- greek small letter rho, U+03C1 ISOgrk3 -->
+<!ENTITY sigmaf   "&#962;"> <!-- greek small letter final sigma,
+                                    U+03C2 ISOgrk3 -->
+<!ENTITY sigma    "&#963;"> <!-- greek small letter sigma,
+                                    U+03C3 ISOgrk3 -->
+<!ENTITY tau      "&#964;"> <!-- greek small letter tau, U+03C4 ISOgrk3 -->
+<!ENTITY upsilon  "&#965;"> <!-- greek small letter upsilon,
+                                    U+03C5 ISOgrk3 -->
+<!ENTITY phi      "&#966;"> <!-- greek small letter phi, U+03C6 ISOgrk3 -->
+<!ENTITY chi      "&#967;"> <!-- greek small letter chi, U+03C7 ISOgrk3 -->
+<!ENTITY psi      "&#968;"> <!-- greek small letter psi, U+03C8 ISOgrk3 -->
+<!ENTITY omega    "&#969;"> <!-- greek small letter omega,
+                                    U+03C9 ISOgrk3 -->
+<!ENTITY thetasym "&#977;"> <!-- greek theta symbol,
+                                    U+03D1 NEW -->
+<!ENTITY upsih    "&#978;"> <!-- greek upsilon with hook symbol,
+                                    U+03D2 NEW -->
+<!ENTITY piv      "&#982;"> <!-- greek pi symbol, U+03D6 ISOgrk3 -->
+
+<!-- General Punctuation -->
+<!ENTITY bull     "&#8226;"> <!-- bullet = black small circle,
+                                     U+2022 ISOpub  -->
+<!-- bullet is NOT the same as bullet operator, U+2219 -->
+<!ENTITY hellip   "&#8230;"> <!-- horizontal ellipsis = three dot leader,
+                                     U+2026 ISOpub  -->
+<!ENTITY prime    "&#8242;"> <!-- prime = minutes = feet, U+2032 ISOtech -->
+<!ENTITY Prime    "&#8243;"> <!-- double prime = seconds = inches,
+                                     U+2033 ISOtech -->
+<!ENTITY oline    "&#8254;"> <!-- overline = spacing overscore,
+                                     U+203E NEW -->
+<!ENTITY frasl    "&#8260;"> <!-- fraction slash, U+2044 NEW -->
+
+<!-- Letterlike Symbols -->
+<!ENTITY weierp   "&#8472;"> <!-- script capital P = power set
+                                     = Weierstrass p, U+2118 ISOamso -->
+<!ENTITY image    "&#8465;"> <!-- black-letter capital I = imaginary part,
+                                     U+2111 ISOamso -->
+<!ENTITY real     "&#8476;"> <!-- black-letter capital R = real part symbol,
+                                     U+211C ISOamso -->
+<!ENTITY trade    "&#8482;"> <!-- trade mark sign, U+2122 ISOnum -->
+<!ENTITY alefsym  "&#8501;"> <!-- alef symbol = first transfinite cardinal,
+                                     U+2135 NEW -->
+<!-- alef symbol is NOT the same as hebrew letter alef,
+     U+05D0 although the same glyph could be used to depict both characters -->
+
+<!-- Arrows -->
+<!ENTITY larr     "&#8592;"> <!-- leftwards arrow, U+2190 ISOnum -->
+<!ENTITY uarr     "&#8593;"> <!-- upwards arrow, U+2191 ISOnum-->
+<!ENTITY rarr     "&#8594;"> <!-- rightwards arrow, U+2192 ISOnum -->
+<!ENTITY darr     "&#8595;"> <!-- downwards arrow, U+2193 ISOnum -->
+<!ENTITY harr     "&#8596;"> <!-- left right arrow, U+2194 ISOamsa -->
+<!ENTITY crarr    "&#8629;"> <!-- downwards arrow with corner leftwards
+                                     = carriage return, U+21B5 NEW -->
+<!ENTITY lArr     "&#8656;"> <!-- leftwards double arrow, U+21D0 ISOtech -->
+<!-- Unicode does not say that lArr is the same as the 'is implied by' arrow
+    but also does not have any other character for that function. So lArr can
+    be used for 'is implied by' as ISOtech suggests -->
+<!ENTITY uArr     "&#8657;"> <!-- upwards double arrow, U+21D1 ISOamsa -->
+<!ENTITY rArr     "&#8658;"> <!-- rightwards double arrow,
+                                     U+21D2 ISOtech -->
+<!-- Unicode does not say this is the 'implies' character but does not have 
+     another character with this function so rArr can be used for 'implies'
+     as ISOtech suggests -->
+<!ENTITY dArr     "&#8659;"> <!-- downwards double arrow, U+21D3 ISOamsa -->
+<!ENTITY hArr     "&#8660;"> <!-- left right double arrow,
+                                     U+21D4 ISOamsa -->
+
+<!-- Mathematical Operators -->
+<!ENTITY forall   "&#8704;"> <!-- for all, U+2200 ISOtech -->
+<!ENTITY part     "&#8706;"> <!-- partial differential, U+2202 ISOtech  -->
+<!ENTITY exist    "&#8707;"> <!-- there exists, U+2203 ISOtech -->
+<!ENTITY empty    "&#8709;"> <!-- empty set = null set, U+2205 ISOamso -->
+<!ENTITY nabla    "&#8711;"> <!-- nabla = backward difference,
+                                     U+2207 ISOtech -->
+<!ENTITY isin     "&#8712;"> <!-- element of, U+2208 ISOtech -->
+<!ENTITY notin    "&#8713;"> <!-- not an element of, U+2209 ISOtech -->
+<!ENTITY ni       "&#8715;"> <!-- contains as member, U+220B ISOtech -->
+<!ENTITY prod     "&#8719;"> <!-- n-ary product = product sign,
+                                     U+220F ISOamsb -->
+<!-- prod is NOT the same character as U+03A0 'greek capital letter pi' though
+     the same glyph might be used for both -->
+<!ENTITY sum      "&#8721;"> <!-- n-ary summation, U+2211 ISOamsb -->
+<!-- sum is NOT the same character as U+03A3 'greek capital letter sigma'
+     though the same glyph might be used for both -->
+<!ENTITY minus    "&#8722;"> <!-- minus sign, U+2212 ISOtech -->
+<!ENTITY lowast   "&#8727;"> <!-- asterisk operator, U+2217 ISOtech -->
+<!ENTITY radic    "&#8730;"> <!-- square root = radical sign,
+                                     U+221A ISOtech -->
+<!ENTITY prop     "&#8733;"> <!-- proportional to, U+221D ISOtech -->
+<!ENTITY infin    "&#8734;"> <!-- infinity, U+221E ISOtech -->
+<!ENTITY ang      "&#8736;"> <!-- angle, U+2220 ISOamso -->
+<!ENTITY and      "&#8743;"> <!-- logical and = wedge, U+2227 ISOtech -->
+<!ENTITY or       "&#8744;"> <!-- logical or = vee, U+2228 ISOtech -->
+<!ENTITY cap      "&#8745;"> <!-- intersection = cap, U+2229 ISOtech -->
+<!ENTITY cup      "&#8746;"> <!-- union = cup, U+222A ISOtech -->
+<!ENTITY int      "&#8747;"> <!-- integral, U+222B ISOtech -->
+<!ENTITY there4   "&#8756;"> <!-- therefore, U+2234 ISOtech -->
+<!ENTITY sim      "&#8764;"> <!-- tilde operator = varies with = similar to,
+                                     U+223C ISOtech -->
+<!-- tilde operator is NOT the same character as the tilde, U+007E,
+     although the same glyph might be used to represent both  -->
+<!ENTITY cong     "&#8773;"> <!-- approximately equal to, U+2245 ISOtech -->
+<!ENTITY asymp    "&#8776;"> <!-- almost equal to = asymptotic to,
+                                     U+2248 ISOamsr -->
+<!ENTITY ne       "&#8800;"> <!-- not equal to, U+2260 ISOtech -->
+<!ENTITY equiv    "&#8801;"> <!-- identical to, U+2261 ISOtech -->
+<!ENTITY le       "&#8804;"> <!-- less-than or equal to, U+2264 ISOtech -->
+<!ENTITY ge       "&#8805;"> <!-- greater-than or equal to,
+                                     U+2265 ISOtech -->
+<!ENTITY sub      "&#8834;"> <!-- subset of, U+2282 ISOtech -->
+<!ENTITY sup      "&#8835;"> <!-- superset of, U+2283 ISOtech -->
+<!ENTITY nsub     "&#8836;"> <!-- not a subset of, U+2284 ISOamsn -->
+<!ENTITY sube     "&#8838;"> <!-- subset of or equal to, U+2286 ISOtech -->
+<!ENTITY supe     "&#8839;"> <!-- superset of or equal to,
+                                     U+2287 ISOtech -->
+<!ENTITY oplus    "&#8853;"> <!-- circled plus = direct sum,
+                                     U+2295 ISOamsb -->
+<!ENTITY otimes   "&#8855;"> <!-- circled times = vector product,
+                                     U+2297 ISOamsb -->
+<!ENTITY perp     "&#8869;"> <!-- up tack = orthogonal to = perpendicular,
+                                     U+22A5 ISOtech -->
+<!ENTITY sdot     "&#8901;"> <!-- dot operator, U+22C5 ISOamsb -->
+<!-- dot operator is NOT the same character as U+00B7 middle dot -->
+
+<!-- Miscellaneous Technical -->
+<!ENTITY lceil    "&#8968;"> <!-- left ceiling = APL upstile,
+                                     U+2308 ISOamsc  -->
+<!ENTITY rceil    "&#8969;"> <!-- right ceiling, U+2309 ISOamsc  -->
+<!ENTITY lfloor   "&#8970;"> <!-- left floor = APL downstile,
+                                     U+230A ISOamsc  -->
+<!ENTITY rfloor   "&#8971;"> <!-- right floor, U+230B ISOamsc  -->
+<!ENTITY lang     "&#9001;"> <!-- left-pointing angle bracket = bra,
+                                     U+2329 ISOtech -->
+<!-- lang is NOT the same character as U+003C 'less than sign' 
+     or U+2039 'single left-pointing angle quotation mark' -->
+<!ENTITY rang     "&#9002;"> <!-- right-pointing angle bracket = ket,
+                                     U+232A ISOtech -->
+<!-- rang is NOT the same character as U+003E 'greater than sign' 
+     or U+203A 'single right-pointing angle quotation mark' -->
+
+<!-- Geometric Shapes -->
+<!ENTITY loz      "&#9674;"> <!-- lozenge, U+25CA ISOpub -->
+
+<!-- Miscellaneous Symbols -->
+<!ENTITY spades   "&#9824;"> <!-- black spade suit, U+2660 ISOpub -->
+<!-- black here seems to mean filled as opposed to hollow -->
+<!ENTITY clubs    "&#9827;"> <!-- black club suit = shamrock,
+                                     U+2663 ISOpub -->
+<!ENTITY hearts   "&#9829;"> <!-- black heart suit = valentine,
+                                     U+2665 ISOpub -->
+<!ENTITY diams    "&#9830;"> <!-- black diamond suit, U+2666 ISOpub -->
diff --git a/lib/xhtml1-strict.dtd b/lib/xhtml1-strict.dtd
new file mode 100644
index 0000000..2927b9e
--- /dev/null
+++ b/lib/xhtml1-strict.dtd
@@ -0,0 +1,978 @@
+<!--
+   Extensible HTML version 1.0 Strict DTD
+
+   This is the same as HTML 4 Strict except for
+   changes due to the differences between XML and SGML.
+
+   Namespace = http://www.w3.org/1999/xhtml
+
+   For further information, see: http://www.w3.org/TR/xhtml1
+
+   Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),
+   All Rights Reserved. 
+
+   This DTD module is identified by the PUBLIC and SYSTEM identifiers:
+
+   PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+   SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+
+   $Revision: 1.1 $
+   $Date: 2002/08/01 13:56:03 $
+
+-->
+
+<!--================ Character mnemonic entities =========================-->
+
+<!ENTITY % HTMLlat1 PUBLIC
+   "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+   "xhtml-lat1.ent">
+%HTMLlat1;
+
+<!ENTITY % HTMLsymbol PUBLIC
+   "-//W3C//ENTITIES Symbols for XHTML//EN"
+   "xhtml-symbol.ent">
+%HTMLsymbol;
+
+<!ENTITY % HTMLspecial PUBLIC
+   "-//W3C//ENTITIES Special for XHTML//EN"
+   "xhtml-special.ent">
+%HTMLspecial;
+
+<!--================== Imported Names ====================================-->
+
+<!ENTITY % ContentType "CDATA">
+    <!-- media type, as per [RFC2045] -->
+
+<!ENTITY % ContentTypes "CDATA">
+    <!-- comma-separated list of media types, as per [RFC2045] -->
+
+<!ENTITY % Charset "CDATA">
+    <!-- a character encoding, as per [RFC2045] -->
+
+<!ENTITY % Charsets "CDATA">
+    <!-- a space separated list of character encodings, as per [RFC2045] -->
+
+<!ENTITY % LanguageCode "NMTOKEN">
+    <!-- a language code, as per [RFC3066] -->
+
+<!ENTITY % Character "CDATA">
+    <!-- a single character, as per section 2.2 of [XML] -->
+
+<!ENTITY % Number "CDATA">
+    <!-- one or more digits -->
+
+<!ENTITY % LinkTypes "CDATA">
+    <!-- space-separated list of link types -->
+
+<!ENTITY % MediaDesc "CDATA">
+    <!-- single or comma-separated list of media descriptors -->
+
+<!ENTITY % URI "CDATA">
+    <!-- a Uniform Resource Identifier, see [RFC2396] -->
+
+<!ENTITY % UriList "CDATA">
+    <!-- a space separated list of Uniform Resource Identifiers -->
+
+<!ENTITY % Datetime "CDATA">
+    <!-- date and time information. ISO date format -->
+
+<!ENTITY % Script "CDATA">
+    <!-- script expression -->
+
+<!ENTITY % StyleSheet "CDATA">
+    <!-- style sheet data -->
+
+<!ENTITY % Text "CDATA">
+    <!-- used for titles etc. -->
+
+<!ENTITY % Length "CDATA">
+    <!-- nn for pixels or nn% for percentage length -->
+
+<!ENTITY % MultiLength "CDATA">
+    <!-- pixel, percentage, or relative -->
+
+<!ENTITY % Pixels "CDATA">
+    <!-- integer representing length in pixels -->
+
+<!-- these are used for image maps -->
+
+<!ENTITY % Shape "(rect|circle|poly|default)">
+
+<!ENTITY % Coords "CDATA">
+    <!-- comma separated list of lengths -->
+
+<!--=================== Generic Attributes ===============================-->
+
+<!-- core attributes common to most elements
+  id       document-wide unique id
+  class    space separated list of classes
+  style    associated style info
+  title    advisory title/amplification
+-->
+<!ENTITY % coreattrs
+ "id          ID             #IMPLIED
+  class       CDATA          #IMPLIED
+  style       %StyleSheet;   #IMPLIED
+  title       %Text;         #IMPLIED"
+  >
+
+<!-- internationalization attributes
+  lang        language code (backwards compatible)
+  xml:lang    language code (as per XML 1.0 spec)
+  dir         direction for weak/neutral text
+-->
+<!ENTITY % i18n
+ "lang        %LanguageCode; #IMPLIED
+  xml:lang    %LanguageCode; #IMPLIED
+  dir         (ltr|rtl)      #IMPLIED"
+  >
+
+<!-- attributes for common UI events
+  onclick     a pointer button was clicked
+  ondblclick  a pointer button was double clicked
+  onmousedown a pointer button was pressed down
+  onmouseup   a pointer button was released
+  onmousemove a pointer was moved onto the element
+  onmouseout  a pointer was moved away from the element
+  onkeypress  a key was pressed and released
+  onkeydown   a key was pressed down
+  onkeyup     a key was released
+-->
+<!ENTITY % events
+ "onclick     %Script;       #IMPLIED
+  ondblclick  %Script;       #IMPLIED
+  onmousedown %Script;       #IMPLIED
+  onmouseup   %Script;       #IMPLIED
+  onmouseover %Script;       #IMPLIED
+  onmousemove %Script;       #IMPLIED
+  onmouseout  %Script;       #IMPLIED
+  onkeypress  %Script;       #IMPLIED
+  onkeydown   %Script;       #IMPLIED
+  onkeyup     %Script;       #IMPLIED"
+  >
+
+<!-- attributes for elements that can get the focus
+  accesskey   accessibility key character
+  tabindex    position in tabbing order
+  onfocus     the element got the focus
+  onblur      the element lost the focus
+-->
+<!ENTITY % focus
+ "accesskey   %Character;    #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED"
+  >
+
+<!ENTITY % attrs "%coreattrs; %i18n; %events;">
+
+<!--=================== Text Elements ====================================-->
+
+<!ENTITY % special.pre
+   "br | span | bdo | map">
+
+
+<!ENTITY % special
+   "%special.pre; | object | img ">
+
+<!ENTITY % fontstyle "tt | i | b | big | small ">
+
+<!ENTITY % phrase "em | strong | dfn | code | q |
+                   samp | kbd | var | cite | abbr | acronym | sub | sup ">
+
+<!ENTITY % inline.forms "input | select | textarea | label | button">
+
+<!-- these can occur at block or inline level -->
+<!ENTITY % misc.inline "ins | del | script">
+
+<!-- these can only occur at block level -->
+<!ENTITY % misc "noscript | %misc.inline;">
+
+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
+
+<!-- %Inline; covers inline or "text-level" elements -->
+<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">
+
+<!--================== Block level elements ==============================-->
+
+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
+<!ENTITY % lists "ul | ol | dl">
+<!ENTITY % blocktext "pre | hr | blockquote | address">
+
+<!ENTITY % block
+     "p | %heading; | div | %lists; | %blocktext; | fieldset | table">
+
+<!ENTITY % Block "(%block; | form | %misc;)*">
+
+<!-- %Flow; mixes block and inline and is used for list items etc. -->
+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">
+
+<!--================== Content models for exclusions =====================-->
+
+<!-- a elements use %Inline; excluding a -->
+
+<!ENTITY % a.content
+   "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*">
+
+<!-- pre uses %Inline excluding big, small, sup or sup -->
+
+<!ENTITY % pre.content
+   "(#PCDATA | a | %fontstyle; | %phrase; | %special.pre; | %misc.inline;
+      | %inline.forms;)*">
+
+<!-- form uses %Block; excluding form -->
+
+<!ENTITY % form.content "(%block; | %misc;)*">
+
+<!-- button uses %Flow; but excludes a, form and form controls -->
+
+<!ENTITY % button.content
+   "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |
+    table | %special; | %fontstyle; | %phrase; | %misc;)*">
+
+<!--================ Document Structure ==================================-->
+
+<!-- the namespace URI designates the document profile -->
+
+<!ELEMENT html (head, body)>
+<!ATTLIST html
+  %i18n;
+  id          ID             #IMPLIED
+  xmlns       %URI;          #FIXED 'http://www.w3.org/1999/xhtml'
+  >
+
+<!--================ Document Head =======================================-->
+
+<!ENTITY % head.misc "(script|style|meta|link|object)*">
+
+<!-- content model is %head.misc; combined with a single
+     title and an optional base element in any order -->
+
+<!ELEMENT head (%head.misc;,
+     ((title, %head.misc;, (base, %head.misc;)?) |
+      (base, %head.misc;, (title, %head.misc;))))>
+
+<!ATTLIST head
+  %i18n;
+  id          ID             #IMPLIED
+  profile     %URI;          #IMPLIED
+  >
+
+<!-- The title element is not considered part of the flow of text.
+       It should be displayed, for example as the page header or
+       window title. Exactly one title is required per document.
+    -->
+<!ELEMENT title (#PCDATA)>
+<!ATTLIST title 
+  %i18n;
+  id          ID             #IMPLIED
+  >
+
+<!-- document base URI -->
+
+<!ELEMENT base EMPTY>
+<!ATTLIST base
+  href        %URI;          #REQUIRED
+  id          ID             #IMPLIED
+  >
+
+<!-- generic metainformation -->
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+  %i18n;
+  id          ID             #IMPLIED
+  http-equiv  CDATA          #IMPLIED
+  name        CDATA          #IMPLIED
+  content     CDATA          #REQUIRED
+  scheme      CDATA          #IMPLIED
+  >
+
+<!--
+  Relationship values can be used in principle:
+
+   a) for document specific toolbars/menus when used
+      with the link element in document head e.g.
+        start, contents, previous, next, index, end, help
+   b) to link to a separate style sheet (rel="stylesheet")
+   c) to make a link to a script (rel="script")
+   d) by stylesheets to control how collections of
+      html nodes are rendered into printed documents
+   e) to make a link to a printable version of this document
+      e.g. a PostScript or PDF version (rel="alternate" media="print")
+-->
+
+<!ELEMENT link EMPTY>
+<!ATTLIST link
+  %attrs;
+  charset     %Charset;      #IMPLIED
+  href        %URI;          #IMPLIED
+  hreflang    %LanguageCode; #IMPLIED
+  type        %ContentType;  #IMPLIED
+  rel         %LinkTypes;    #IMPLIED
+  rev         %LinkTypes;    #IMPLIED
+  media       %MediaDesc;    #IMPLIED
+  >
+
+<!-- style info, which may include CDATA sections -->
+<!ELEMENT style (#PCDATA)>
+<!ATTLIST style
+  %i18n;
+  id          ID             #IMPLIED
+  type        %ContentType;  #REQUIRED
+  media       %MediaDesc;    #IMPLIED
+  title       %Text;         #IMPLIED
+  xml:space   (preserve)     #FIXED 'preserve'
+  >
+
+<!-- script statements, which may include CDATA sections -->
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+  id          ID             #IMPLIED
+  charset     %Charset;      #IMPLIED
+  type        %ContentType;  #REQUIRED
+  src         %URI;          #IMPLIED
+  defer       (defer)        #IMPLIED
+  xml:space   (preserve)     #FIXED 'preserve'
+  >
+
+<!-- alternate content container for non script-based rendering -->
+
+<!ELEMENT noscript %Block;>
+<!ATTLIST noscript
+  %attrs;
+  >
+
+<!--=================== Document Body ====================================-->
+
+<!ELEMENT body %Block;>
+<!ATTLIST body
+  %attrs;
+  onload          %Script;   #IMPLIED
+  onunload        %Script;   #IMPLIED
+  >
+
+<!ELEMENT div %Flow;>  <!-- generic language/style container -->
+<!ATTLIST div
+  %attrs;
+  >
+
+<!--=================== Paragraphs =======================================-->
+
+<!ELEMENT p %Inline;>
+<!ATTLIST p
+  %attrs;
+  >
+
+<!--=================== Headings =========================================-->
+
+<!--
+  There are six levels of headings from h1 (the most important)
+  to h6 (the least important).
+-->
+
+<!ELEMENT h1  %Inline;>
+<!ATTLIST h1
+   %attrs;
+   >
+
+<!ELEMENT h2 %Inline;>
+<!ATTLIST h2
+   %attrs;
+   >
+
+<!ELEMENT h3 %Inline;>
+<!ATTLIST h3
+   %attrs;
+   >
+
+<!ELEMENT h4 %Inline;>
+<!ATTLIST h4
+   %attrs;
+   >
+
+<!ELEMENT h5 %Inline;>
+<!ATTLIST h5
+   %attrs;
+   >
+
+<!ELEMENT h6 %Inline;>
+<!ATTLIST h6
+   %attrs;
+   >
+
+<!--=================== Lists ============================================-->
+
+<!-- Unordered list -->
+
+<!ELEMENT ul (li)+>
+<!ATTLIST ul
+  %attrs;
+  >
+
+<!-- Ordered (numbered) list -->
+
+<!ELEMENT ol (li)+>
+<!ATTLIST ol
+  %attrs;
+  >
+
+<!-- list item -->
+
+<!ELEMENT li %Flow;>
+<!ATTLIST li
+  %attrs;
+  >
+
+<!-- definition lists - dt for term, dd for its definition -->
+
+<!ELEMENT dl (dt|dd)+>
+<!ATTLIST dl
+  %attrs;
+  >
+
+<!ELEMENT dt %Inline;>
+<!ATTLIST dt
+  %attrs;
+  >
+
+<!ELEMENT dd %Flow;>
+<!ATTLIST dd
+  %attrs;
+  >
+
+<!--=================== Address ==========================================-->
+
+<!-- information on author -->
+
+<!ELEMENT address %Inline;>
+<!ATTLIST address
+  %attrs;
+  >
+
+<!--=================== Horizontal Rule ==================================-->
+
+<!ELEMENT hr EMPTY>
+<!ATTLIST hr
+  %attrs;
+  >
+
+<!--=================== Preformatted Text ================================-->
+
+<!-- content is %Inline; excluding "img|object|big|small|sub|sup" -->
+
+<!ELEMENT pre %pre.content;>
+<!ATTLIST pre
+  %attrs;
+  xml:space (preserve) #FIXED 'preserve'
+  >
+
+<!--=================== Block-like Quotes ================================-->
+
+<!ELEMENT blockquote %Block;>
+<!ATTLIST blockquote
+  %attrs;
+  cite        %URI;          #IMPLIED
+  >
+
+<!--=================== Inserted/Deleted Text ============================-->
+
+<!--
+  ins/del are allowed in block and inline content, but its
+  inappropriate to include block content within an ins element
+  occurring in inline content.
+-->
+<!ELEMENT ins %Flow;>
+<!ATTLIST ins
+  %attrs;
+  cite        %URI;          #IMPLIED
+  datetime    %Datetime;     #IMPLIED
+  >
+
+<!ELEMENT del %Flow;>
+<!ATTLIST del
+  %attrs;
+  cite        %URI;          #IMPLIED
+  datetime    %Datetime;     #IMPLIED
+  >
+
+<!--================== The Anchor Element ================================-->
+
+<!-- content is %Inline; except that anchors shouldn't be nested -->
+
+<!ELEMENT a %a.content;>
+<!ATTLIST a
+  %attrs;
+  %focus;
+  charset     %Charset;      #IMPLIED
+  type        %ContentType;  #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  href        %URI;          #IMPLIED
+  hreflang    %LanguageCode; #IMPLIED
+  rel         %LinkTypes;    #IMPLIED
+  rev         %LinkTypes;    #IMPLIED
+  shape       %Shape;        "rect"
+  coords      %Coords;       #IMPLIED
+  >
+
+<!--===================== Inline Elements ================================-->
+
+<!ELEMENT span %Inline;> <!-- generic language/style container -->
+<!ATTLIST span
+  %attrs;
+  >
+
+<!ELEMENT bdo %Inline;>  <!-- I18N BiDi over-ride -->
+<!ATTLIST bdo
+  %coreattrs;
+  %events;
+  lang        %LanguageCode; #IMPLIED
+  xml:lang    %LanguageCode; #IMPLIED
+  dir         (ltr|rtl)      #REQUIRED
+  >
+
+<!ELEMENT br EMPTY>   <!-- forced line break -->
+<!ATTLIST br
+  %coreattrs;
+  >
+
+<!ELEMENT em %Inline;>   <!-- emphasis -->
+<!ATTLIST em %attrs;>
+
+<!ELEMENT strong %Inline;>   <!-- strong emphasis -->
+<!ATTLIST strong %attrs;>
+
+<!ELEMENT dfn %Inline;>   <!-- definitional -->
+<!ATTLIST dfn %attrs;>
+
+<!ELEMENT code %Inline;>   <!-- program code -->
+<!ATTLIST code %attrs;>
+
+<!ELEMENT samp %Inline;>   <!-- sample -->
+<!ATTLIST samp %attrs;>
+
+<!ELEMENT kbd %Inline;>  <!-- something user would type -->
+<!ATTLIST kbd %attrs;>
+
+<!ELEMENT var %Inline;>   <!-- variable -->
+<!ATTLIST var %attrs;>
+
+<!ELEMENT cite %Inline;>   <!-- citation -->
+<!ATTLIST cite %attrs;>
+
+<!ELEMENT abbr %Inline;>   <!-- abbreviation -->
+<!ATTLIST abbr %attrs;>
+
+<!ELEMENT acronym %Inline;>   <!-- acronym -->
+<!ATTLIST acronym %attrs;>
+
+<!ELEMENT q %Inline;>   <!-- inlined quote -->
+<!ATTLIST q
+  %attrs;
+  cite        %URI;          #IMPLIED
+  >
+
+<!ELEMENT sub %Inline;> <!-- subscript -->
+<!ATTLIST sub %attrs;>
+
+<!ELEMENT sup %Inline;> <!-- superscript -->
+<!ATTLIST sup %attrs;>
+
+<!ELEMENT tt %Inline;>   <!-- fixed pitch font -->
+<!ATTLIST tt %attrs;>
+
+<!ELEMENT i %Inline;>   <!-- italic font -->
+<!ATTLIST i %attrs;>
+
+<!ELEMENT b %Inline;>   <!-- bold font -->
+<!ATTLIST b %attrs;>
+
+<!ELEMENT big %Inline;>   <!-- bigger font -->
+<!ATTLIST big %attrs;>
+
+<!ELEMENT small %Inline;>   <!-- smaller font -->
+<!ATTLIST small %attrs;>
+
+<!--==================== Object ======================================-->
+<!--
+  object is used to embed objects as part of HTML pages.
+  param elements should precede other content. Parameters
+  can also be expressed as attribute/value pairs on the
+  object element itself when brevity is desired.
+-->
+
+<!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST object
+  %attrs;
+  declare     (declare)      #IMPLIED
+  classid     %URI;          #IMPLIED
+  codebase    %URI;          #IMPLIED
+  data        %URI;          #IMPLIED
+  type        %ContentType;  #IMPLIED
+  codetype    %ContentType;  #IMPLIED
+  archive     %UriList;      #IMPLIED
+  standby     %Text;         #IMPLIED
+  height      %Length;       #IMPLIED
+  width       %Length;       #IMPLIED
+  usemap      %URI;          #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  >
+
+<!--
+  param is used to supply a named property value.
+  In XML it would seem natural to follow RDF and support an
+  abbreviated syntax where the param elements are replaced
+  by attribute value pairs on the object start tag.
+-->
+<!ELEMENT param EMPTY>
+<!ATTLIST param
+  id          ID             #IMPLIED
+  name        CDATA          #IMPLIED
+  value       CDATA          #IMPLIED
+  valuetype   (data|ref|object) "data"
+  type        %ContentType;  #IMPLIED
+  >
+
+<!--=================== Images ===========================================-->
+
+<!--
+   To avoid accessibility problems for people who aren't
+   able to see the image, you should provide a text
+   description using the alt and longdesc attributes.
+   In addition, avoid the use of server-side image maps.
+   Note that in this DTD there is no name attribute. That
+   is only available in the transitional and frameset DTD.
+-->
+
+<!ELEMENT img EMPTY>
+<!ATTLIST img
+  %attrs;
+  src         %URI;          #REQUIRED
+  alt         %Text;         #REQUIRED
+  longdesc    %URI;          #IMPLIED
+  height      %Length;       #IMPLIED
+  width       %Length;       #IMPLIED
+  usemap      %URI;          #IMPLIED
+  ismap       (ismap)        #IMPLIED
+  >
+
+<!-- usemap points to a map element which may be in this document
+  or an external document, although the latter is not widely supported -->
+
+<!--================== Client-side image maps ============================-->
+
+<!-- These can be placed in the same document or grouped in a
+     separate document although this isn't yet widely supported -->
+
+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>
+<!ATTLIST map
+  %i18n;
+  %events;
+  id          ID             #REQUIRED
+  class       CDATA          #IMPLIED
+  style       %StyleSheet;   #IMPLIED
+  title       %Text;         #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  >
+
+<!ELEMENT area EMPTY>
+<!ATTLIST area
+  %attrs;
+  %focus;
+  shape       %Shape;        "rect"
+  coords      %Coords;       #IMPLIED
+  href        %URI;          #IMPLIED
+  nohref      (nohref)       #IMPLIED
+  alt         %Text;         #REQUIRED
+  >
+
+<!--================ Forms ===============================================-->
+<!ELEMENT form %form.content;>   <!-- forms shouldn't be nested -->
+
+<!ATTLIST form
+  %attrs;
+  action      %URI;          #REQUIRED
+  method      (get|post)     "get"
+  enctype     %ContentType;  "application/x-www-form-urlencoded"
+  onsubmit    %Script;       #IMPLIED
+  onreset     %Script;       #IMPLIED
+  accept      %ContentTypes; #IMPLIED
+  accept-charset %Charsets;  #IMPLIED
+  >
+
+<!--
+  Each label must not contain more than ONE field
+  Label elements shouldn't be nested.
+-->
+<!ELEMENT label %Inline;>
+<!ATTLIST label
+  %attrs;
+  for         IDREF          #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  >
+
+<!ENTITY % InputType
+  "(text | password | checkbox |
+    radio | submit | reset |
+    file | hidden | image | button)"
+   >
+
+<!-- the name attribute is required for all but submit & reset -->
+
+<!ELEMENT input EMPTY>     <!-- form control -->
+<!ATTLIST input
+  %attrs;
+  %focus;
+  type        %InputType;    "text"
+  name        CDATA          #IMPLIED
+  value       CDATA          #IMPLIED
+  checked     (checked)      #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  readonly    (readonly)     #IMPLIED
+  size        CDATA          #IMPLIED
+  maxlength   %Number;       #IMPLIED
+  src         %URI;          #IMPLIED
+  alt         CDATA          #IMPLIED
+  usemap      %URI;          #IMPLIED
+  onselect    %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  accept      %ContentTypes; #IMPLIED
+  >
+
+<!ELEMENT select (optgroup|option)+>  <!-- option selector -->
+<!ATTLIST select
+  %attrs;
+  name        CDATA          #IMPLIED
+  size        %Number;       #IMPLIED
+  multiple    (multiple)     #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  >
+
+<!ELEMENT optgroup (option)+>   <!-- option group -->
+<!ATTLIST optgroup
+  %attrs;
+  disabled    (disabled)     #IMPLIED
+  label       %Text;         #REQUIRED
+  >
+
+<!ELEMENT option (#PCDATA)>     <!-- selectable choice -->
+<!ATTLIST option
+  %attrs;
+  selected    (selected)     #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  label       %Text;         #IMPLIED
+  value       CDATA          #IMPLIED
+  >
+
+<!ELEMENT textarea (#PCDATA)>     <!-- multi-line text field -->
+<!ATTLIST textarea
+  %attrs;
+  %focus;
+  name        CDATA          #IMPLIED
+  rows        %Number;       #REQUIRED
+  cols        %Number;       #REQUIRED
+  disabled    (disabled)     #IMPLIED
+  readonly    (readonly)     #IMPLIED
+  onselect    %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  >
+
+<!--
+  The fieldset element is used to group form fields.
+  Only one legend element should occur in the content
+  and if present should only be preceded by whitespace.
+-->
+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>
+<!ATTLIST fieldset
+  %attrs;
+  >
+
+<!ELEMENT legend %Inline;>     <!-- fieldset label -->
+<!ATTLIST legend
+  %attrs;
+  accesskey   %Character;    #IMPLIED
+  >
+
+<!--
+ Content is %Flow; excluding a, form and form controls
+--> 
+<!ELEMENT button %button.content;>  <!-- push button -->
+<!ATTLIST button
+  %attrs;
+  %focus;
+  name        CDATA          #IMPLIED
+  value       CDATA          #IMPLIED
+  type        (button|submit|reset) "submit"
+  disabled    (disabled)     #IMPLIED
+  >
+
+<!--======================= Tables =======================================-->
+
+<!-- Derived from IETF HTML table standard, see [RFC1942] -->
+
+<!--
+ The border attribute sets the thickness of the frame around the
+ table. The default units are screen pixels.
+
+ The frame attribute specifies which parts of the frame around
+ the table should be rendered. The values are not the same as
+ CALS to avoid a name clash with the valign attribute.
+-->
+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
+
+<!--
+ The rules attribute defines which rules to draw between cells:
+
+ If rules is absent then assume:
+     "none" if border is absent or border="0" otherwise "all"
+-->
+
+<!ENTITY % TRules "(none | groups | rows | cols | all)">
+  
+<!-- horizontal alignment attributes for cell contents
+
+  char        alignment char, e.g. char=':'
+  charoff     offset for alignment char
+-->
+<!ENTITY % cellhalign
+  "align      (left|center|right|justify|char) #IMPLIED
+   char       %Character;    #IMPLIED
+   charoff    %Length;       #IMPLIED"
+  >
+
+<!-- vertical alignment attributes for cell contents -->
+<!ENTITY % cellvalign
+  "valign     (top|middle|bottom|baseline) #IMPLIED"
+  >
+
+<!ELEMENT table
+     (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>
+<!ELEMENT caption  %Inline;>
+<!ELEMENT thead    (tr)+>
+<!ELEMENT tfoot    (tr)+>
+<!ELEMENT tbody    (tr)+>
+<!ELEMENT colgroup (col)*>
+<!ELEMENT col      EMPTY>
+<!ELEMENT tr       (th|td)+>
+<!ELEMENT th       %Flow;>
+<!ELEMENT td       %Flow;>
+
+<!ATTLIST table
+  %attrs;
+  summary     %Text;         #IMPLIED
+  width       %Length;       #IMPLIED
+  border      %Pixels;       #IMPLIED
+  frame       %TFrame;       #IMPLIED
+  rules       %TRules;       #IMPLIED
+  cellspacing %Length;       #IMPLIED
+  cellpadding %Length;       #IMPLIED
+  >
+
+<!ATTLIST caption
+  %attrs;
+  >
+
+<!--
+colgroup groups a set of col elements. It allows you to group
+several semantically related columns together.
+-->
+<!ATTLIST colgroup
+  %attrs;
+  span        %Number;       "1"
+  width       %MultiLength;  #IMPLIED
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!--
+ col elements define the alignment properties for cells in
+ one or more columns.
+
+ The width attribute specifies the width of the columns, e.g.
+
+     width=64        width in screen pixels
+     width=0.5*      relative width of 0.5
+
+ The span attribute causes the attributes of one
+ col element to apply to more than one column.
+-->
+<!ATTLIST col
+  %attrs;
+  span        %Number;       "1"
+  width       %MultiLength;  #IMPLIED
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!--
+    Use thead to duplicate headers when breaking table
+    across page boundaries, or for static headers when
+    tbody sections are rendered in scrolling panel.
+
+    Use tfoot to duplicate footers when breaking table
+    across page boundaries, or for static footers when
+    tbody sections are rendered in scrolling panel.
+
+    Use multiple tbody sections when rules are needed
+    between groups of table rows.
+-->
+<!ATTLIST thead
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tfoot
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tbody
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tr
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+
+<!-- Scope is simpler than headers attribute for common tables -->
+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
+
+<!-- th is for headers, td for data and for cells acting as both -->
+
+<!ATTLIST th
+  %attrs;
+  abbr        %Text;         #IMPLIED
+  axis        CDATA          #IMPLIED
+  headers     IDREFS         #IMPLIED
+  scope       %Scope;        #IMPLIED
+  rowspan     %Number;       "1"
+  colspan     %Number;       "1"
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST td
+  %attrs;
+  abbr        %Text;         #IMPLIED
+  axis        CDATA          #IMPLIED
+  headers     IDREFS         #IMPLIED
+  scope       %Scope;        #IMPLIED
+  rowspan     %Number;       "1"
+  colspan     %Number;       "1"
+  %cellhalign;
+  %cellvalign;
+  >
+
diff --git a/lib/xhtml1-transitional.dtd b/lib/xhtml1-transitional.dtd
new file mode 100644
index 0000000..628f27a
--- /dev/null
+++ b/lib/xhtml1-transitional.dtd
@@ -0,0 +1,1201 @@
+<!--
+   Extensible HTML version 1.0 Transitional DTD
+
+   This is the same as HTML 4 Transitional except for
+   changes due to the differences between XML and SGML.
+
+   Namespace = http://www.w3.org/1999/xhtml
+
+   For further information, see: http://www.w3.org/TR/xhtml1
+
+   Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),
+   All Rights Reserved. 
+
+   This DTD module is identified by the PUBLIC and SYSTEM identifiers:
+
+   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+   SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
+
+   $Revision: 1.2 $
+   $Date: 2002/08/01 18:37:55 $
+
+-->
+
+<!--================ Character mnemonic entities =========================-->
+
+<!ENTITY % HTMLlat1 PUBLIC
+   "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+   "xhtml-lat1.ent">
+%HTMLlat1;
+
+<!ENTITY % HTMLsymbol PUBLIC
+   "-//W3C//ENTITIES Symbols for XHTML//EN"
+   "xhtml-symbol.ent">
+%HTMLsymbol;
+
+<!ENTITY % HTMLspecial PUBLIC
+   "-//W3C//ENTITIES Special for XHTML//EN"
+   "xhtml-special.ent">
+%HTMLspecial;
+
+<!--================== Imported Names ====================================-->
+
+<!ENTITY % ContentType "CDATA">
+    <!-- media type, as per [RFC2045] -->
+
+<!ENTITY % ContentTypes "CDATA">
+    <!-- comma-separated list of media types, as per [RFC2045] -->
+
+<!ENTITY % Charset "CDATA">
+    <!-- a character encoding, as per [RFC2045] -->
+
+<!ENTITY % Charsets "CDATA">
+    <!-- a space separated list of character encodings, as per [RFC2045] -->
+
+<!ENTITY % LanguageCode "NMTOKEN">
+    <!-- a language code, as per [RFC3066] -->
+
+<!ENTITY % Character "CDATA">
+    <!-- a single character, as per section 2.2 of [XML] -->
+
+<!ENTITY % Number "CDATA">
+    <!-- one or more digits -->
+
+<!ENTITY % LinkTypes "CDATA">
+    <!-- space-separated list of link types -->
+
+<!ENTITY % MediaDesc "CDATA">
+    <!-- single or comma-separated list of media descriptors -->
+
+<!ENTITY % URI "CDATA">
+    <!-- a Uniform Resource Identifier, see [RFC2396] -->
+
+<!ENTITY % UriList "CDATA">
+    <!-- a space separated list of Uniform Resource Identifiers -->
+
+<!ENTITY % Datetime "CDATA">
+    <!-- date and time information. ISO date format -->
+
+<!ENTITY % Script "CDATA">
+    <!-- script expression -->
+
+<!ENTITY % StyleSheet "CDATA">
+    <!-- style sheet data -->
+
+<!ENTITY % Text "CDATA">
+    <!-- used for titles etc. -->
+
+<!ENTITY % FrameTarget "NMTOKEN">
+    <!-- render in this frame -->
+
+<!ENTITY % Length "CDATA">
+    <!-- nn for pixels or nn% for percentage length -->
+
+<!ENTITY % MultiLength "CDATA">
+    <!-- pixel, percentage, or relative -->
+
+<!ENTITY % Pixels "CDATA">
+    <!-- integer representing length in pixels -->
+
+<!-- these are used for image maps -->
+
+<!ENTITY % Shape "(rect|circle|poly|default)">
+
+<!ENTITY % Coords "CDATA">
+    <!-- comma separated list of lengths -->
+
+<!-- used for object, applet, img, input and iframe -->
+<!ENTITY % ImgAlign "(top|middle|bottom|left|right)">
+
+<!-- a color using sRGB: #RRGGBB as Hex values -->
+<!ENTITY % Color "CDATA">
+
+<!-- There are also 16 widely known color names with their sRGB values:
+
+    Black  = #000000    Green  = #008000
+    Silver = #C0C0C0    Lime   = #00FF00
+    Gray   = #808080    Olive  = #808000
+    White  = #FFFFFF    Yellow = #FFFF00
+    Maroon = #800000    Navy   = #000080
+    Red    = #FF0000    Blue   = #0000FF
+    Purple = #800080    Teal   = #008080
+    Fuchsia= #FF00FF    Aqua   = #00FFFF
+-->
+
+<!--=================== Generic Attributes ===============================-->
+
+<!-- core attributes common to most elements
+  id       document-wide unique id
+  class    space separated list of classes
+  style    associated style info
+  title    advisory title/amplification
+-->
+<!ENTITY % coreattrs
+ "id          ID             #IMPLIED
+  class       CDATA          #IMPLIED
+  style       %StyleSheet;   #IMPLIED
+  title       %Text;         #IMPLIED"
+  >
+
+<!-- internationalization attributes
+  lang        language code (backwards compatible)
+  xml:lang    language code (as per XML 1.0 spec)
+  dir         direction for weak/neutral text
+-->
+<!ENTITY % i18n
+ "lang        %LanguageCode; #IMPLIED
+  xml:lang    %LanguageCode; #IMPLIED
+  dir         (ltr|rtl)      #IMPLIED"
+  >
+
+<!-- attributes for common UI events
+  onclick     a pointer button was clicked
+  ondblclick  a pointer button was double clicked
+  onmousedown a pointer button was pressed down
+  onmouseup   a pointer button was released
+  onmousemove a pointer was moved onto the element
+  onmouseout  a pointer was moved away from the element
+  onkeypress  a key was pressed and released
+  onkeydown   a key was pressed down
+  onkeyup     a key was released
+-->
+<!ENTITY % events
+ "onclick     %Script;       #IMPLIED
+  ondblclick  %Script;       #IMPLIED
+  onmousedown %Script;       #IMPLIED
+  onmouseup   %Script;       #IMPLIED
+  onmouseover %Script;       #IMPLIED
+  onmousemove %Script;       #IMPLIED
+  onmouseout  %Script;       #IMPLIED
+  onkeypress  %Script;       #IMPLIED
+  onkeydown   %Script;       #IMPLIED
+  onkeyup     %Script;       #IMPLIED"
+  >
+
+<!-- attributes for elements that can get the focus
+  accesskey   accessibility key character
+  tabindex    position in tabbing order
+  onfocus     the element got the focus
+  onblur      the element lost the focus
+-->
+<!ENTITY % focus
+ "accesskey   %Character;    #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED"
+  >
+
+<!ENTITY % attrs "%coreattrs; %i18n; %events;">
+
+<!-- text alignment for p, div, h1-h6. The default is
+     align="left" for ltr headings, "right" for rtl -->
+
+<!ENTITY % TextAlign "align (left|center|right|justify) #IMPLIED">
+
+<!--=================== Text Elements ====================================-->
+
+<!ENTITY % special.extra
+   "object | applet | img | map | iframe">
+	
+<!ENTITY % special.basic
+	"br | span | bdo">
+
+<!ENTITY % special
+   "%special.basic; | %special.extra;">
+
+<!ENTITY % fontstyle.extra "big | small | font | basefont">
+
+<!ENTITY % fontstyle.basic "tt | i | b | u
+                      | s | strike ">
+
+<!ENTITY % fontstyle "%fontstyle.basic; | %fontstyle.extra;">
+
+<!ENTITY % phrase.extra "sub | sup">
+<!ENTITY % phrase.basic "em | strong | dfn | code | q |
+                   samp | kbd | var | cite | abbr | acronym">
+
+<!ENTITY % phrase "%phrase.basic; | %phrase.extra;">
+
+<!ENTITY % inline.forms "input | select | textarea | label | button">
+
+<!-- these can occur at block or inline level -->
+<!ENTITY % misc.inline "ins | del | script">
+
+<!-- these can only occur at block level -->
+<!ENTITY % misc "noscript | %misc.inline;">
+
+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
+
+<!-- %Inline; covers inline or "text-level" elements -->
+<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">
+
+<!--================== Block level elements ==============================-->
+
+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
+<!ENTITY % lists "ul | ol | dl | menu | dir">
+<!ENTITY % blocktext "pre | hr | blockquote | address | center | noframes">
+
+<!ENTITY % block
+    "p | %heading; | div | %lists; | %blocktext; | isindex |fieldset | table">
+
+<!-- %Flow; mixes block and inline and is used for list items etc. -->
+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">
+
+<!--================== Content models for exclusions =====================-->
+
+<!-- a elements use %Inline; excluding a -->
+
+<!ENTITY % a.content
+   "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*">
+
+<!-- pre uses %Inline excluding img, object, applet, big, small,
+     font, or basefont -->
+
+<!ENTITY % pre.content
+   "(#PCDATA | a | %special.basic; | %fontstyle.basic; | %phrase.basic; |
+	   %inline.forms; | %misc.inline;)*">
+
+<!-- form uses %Flow; excluding form -->
+
+<!ENTITY % form.content "(#PCDATA | %block; | %inline; | %misc;)*">
+
+<!-- button uses %Flow; but excludes a, form, form controls, iframe -->
+
+<!ENTITY % button.content
+   "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |
+      table | br | span | bdo | object | applet | img | map |
+      %fontstyle; | %phrase; | %misc;)*">
+
+<!--================ Document Structure ==================================-->
+
+<!-- the namespace URI designates the document profile -->
+
+<!ELEMENT html (head, body)>
+<!ATTLIST html
+  %i18n;
+  id          ID             #IMPLIED
+  xmlns       %URI;          #FIXED 'http://www.w3.org/1999/xhtml'
+  >
+
+<!--================ Document Head =======================================-->
+
+<!ENTITY % head.misc "(script|style|meta|link|object|isindex)*">
+
+<!-- content model is %head.misc; combined with a single
+     title and an optional base element in any order -->
+
+<!ELEMENT head (%head.misc;,
+     ((title, %head.misc;, (base, %head.misc;)?) |
+      (base, %head.misc;, (title, %head.misc;))))>
+
+<!ATTLIST head
+  %i18n;
+  id          ID             #IMPLIED
+  profile     %URI;          #IMPLIED
+  >
+
+<!-- The title element is not considered part of the flow of text.
+       It should be displayed, for example as the page header or
+       window title. Exactly one title is required per document.
+    -->
+<!ELEMENT title (#PCDATA)>
+<!ATTLIST title 
+  %i18n;
+  id          ID             #IMPLIED
+  >
+
+<!-- document base URI -->
+
+<!ELEMENT base EMPTY>
+<!ATTLIST base
+  id          ID             #IMPLIED
+  href        %URI;          #IMPLIED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!-- generic metainformation -->
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+  %i18n;
+  id          ID             #IMPLIED
+  http-equiv  CDATA          #IMPLIED
+  name        CDATA          #IMPLIED
+  content     CDATA          #REQUIRED
+  scheme      CDATA          #IMPLIED
+  >
+
+<!--
+  Relationship values can be used in principle:
+
+   a) for document specific toolbars/menus when used
+      with the link element in document head e.g.
+        start, contents, previous, next, index, end, help
+   b) to link to a separate style sheet (rel="stylesheet")
+   c) to make a link to a script (rel="script")
+   d) by stylesheets to control how collections of
+      html nodes are rendered into printed documents
+   e) to make a link to a printable version of this document
+      e.g. a PostScript or PDF version (rel="alternate" media="print")
+-->
+
+<!ELEMENT link EMPTY>
+<!ATTLIST link
+  %attrs;
+  charset     %Charset;      #IMPLIED
+  href        %URI;          #IMPLIED
+  hreflang    %LanguageCode; #IMPLIED
+  type        %ContentType;  #IMPLIED
+  rel         %LinkTypes;    #IMPLIED
+  rev         %LinkTypes;    #IMPLIED
+  media       %MediaDesc;    #IMPLIED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!-- style info, which may include CDATA sections -->
+<!ELEMENT style (#PCDATA)>
+<!ATTLIST style
+  %i18n;
+  id          ID             #IMPLIED
+  type        %ContentType;  #REQUIRED
+  media       %MediaDesc;    #IMPLIED
+  title       %Text;         #IMPLIED
+  xml:space   (preserve)     #FIXED 'preserve'
+  >
+
+<!-- script statements, which may include CDATA sections -->
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+  id          ID             #IMPLIED
+  charset     %Charset;      #IMPLIED
+  type        %ContentType;  #REQUIRED
+  language    CDATA          #IMPLIED
+  src         %URI;          #IMPLIED
+  defer       (defer)        #IMPLIED
+  xml:space   (preserve)     #FIXED 'preserve'
+  >
+
+<!-- alternate content container for non script-based rendering -->
+
+<!ELEMENT noscript %Flow;>
+<!ATTLIST noscript
+  %attrs;
+  >
+
+<!--======================= Frames =======================================-->
+
+<!-- inline subwindow -->
+
+<!ELEMENT iframe %Flow;>
+<!ATTLIST iframe
+  %coreattrs;
+  longdesc    %URI;          #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  src         %URI;          #IMPLIED
+  frameborder (1|0)          "1"
+  marginwidth %Pixels;       #IMPLIED
+  marginheight %Pixels;      #IMPLIED
+  scrolling   (yes|no|auto)  "auto"
+  align       %ImgAlign;     #IMPLIED
+  height      %Length;       #IMPLIED
+  width       %Length;       #IMPLIED
+  >
+
+<!-- alternate content container for non frame-based rendering -->
+
+<!ELEMENT noframes %Flow;>
+<!ATTLIST noframes
+  %attrs;
+  >
+
+<!--=================== Document Body ====================================-->
+
+<!ELEMENT body %Flow;>
+<!ATTLIST body
+  %attrs;
+  onload      %Script;       #IMPLIED
+  onunload    %Script;       #IMPLIED
+  background  %URI;          #IMPLIED
+  bgcolor     %Color;        #IMPLIED
+  text        %Color;        #IMPLIED
+  link        %Color;        #IMPLIED
+  vlink       %Color;        #IMPLIED
+  alink       %Color;        #IMPLIED
+  >
+
+<!ELEMENT div %Flow;>  <!-- generic language/style container -->
+<!ATTLIST div
+  %attrs;
+  %TextAlign;
+  >
+
+<!--=================== Paragraphs =======================================-->
+
+<!ELEMENT p %Inline;>
+<!ATTLIST p
+  %attrs;
+  %TextAlign;
+  >
+
+<!--=================== Headings =========================================-->
+
+<!--
+  There are six levels of headings from h1 (the most important)
+  to h6 (the least important).
+-->
+
+<!ELEMENT h1  %Inline;>
+<!ATTLIST h1
+  %attrs;
+  %TextAlign;
+  >
+
+<!ELEMENT h2 %Inline;>
+<!ATTLIST h2
+  %attrs;
+  %TextAlign;
+  >
+
+<!ELEMENT h3 %Inline;>
+<!ATTLIST h3
+  %attrs;
+  %TextAlign;
+  >
+
+<!ELEMENT h4 %Inline;>
+<!ATTLIST h4
+  %attrs;
+  %TextAlign;
+  >
+
+<!ELEMENT h5 %Inline;>
+<!ATTLIST h5
+  %attrs;
+  %TextAlign;
+  >
+
+<!ELEMENT h6 %Inline;>
+<!ATTLIST h6
+  %attrs;
+  %TextAlign;
+  >
+
+<!--=================== Lists ============================================-->
+
+<!-- Unordered list bullet styles -->
+
+<!ENTITY % ULStyle "(disc|square|circle)">
+
+<!-- Unordered list -->
+
+<!ELEMENT ul (li)+>
+<!ATTLIST ul
+  %attrs;
+  type        %ULStyle;     #IMPLIED
+  compact     (compact)     #IMPLIED
+  >
+
+<!-- Ordered list numbering style
+
+    1   arabic numbers      1, 2, 3, ...
+    a   lower alpha         a, b, c, ...
+    A   upper alpha         A, B, C, ...
+    i   lower roman         i, ii, iii, ...
+    I   upper roman         I, II, III, ...
+
+    The style is applied to the sequence number which by default
+    is reset to 1 for the first list item in an ordered list.
+-->
+<!ENTITY % OLStyle "CDATA">
+
+<!-- Ordered (numbered) list -->
+
+<!ELEMENT ol (li)+>
+<!ATTLIST ol
+  %attrs;
+  type        %OLStyle;      #IMPLIED
+  compact     (compact)      #IMPLIED
+  start       %Number;       #IMPLIED
+  >
+
+<!-- single column list (DEPRECATED) --> 
+<!ELEMENT menu (li)+>
+<!ATTLIST menu
+  %attrs;
+  compact     (compact)     #IMPLIED
+  >
+
+<!-- multiple column list (DEPRECATED) --> 
+<!ELEMENT dir (li)+>
+<!ATTLIST dir
+  %attrs;
+  compact     (compact)     #IMPLIED
+  >
+
+<!-- LIStyle is constrained to: "(%ULStyle;|%OLStyle;)" -->
+<!ENTITY % LIStyle "CDATA">
+
+<!-- list item -->
+
+<!ELEMENT li %Flow;>
+<!ATTLIST li
+  %attrs;
+  type        %LIStyle;      #IMPLIED
+  value       %Number;       #IMPLIED
+  >
+
+<!-- definition lists - dt for term, dd for its definition -->
+
+<!ELEMENT dl (dt|dd)+>
+<!ATTLIST dl
+  %attrs;
+  compact     (compact)      #IMPLIED
+  >
+
+<!ELEMENT dt %Inline;>
+<!ATTLIST dt
+  %attrs;
+  >
+
+<!ELEMENT dd %Flow;>
+<!ATTLIST dd
+  %attrs;
+  >
+
+<!--=================== Address ==========================================-->
+
+<!-- information on author -->
+
+<!ELEMENT address (#PCDATA | %inline; | %misc.inline; | p)*>
+<!ATTLIST address
+  %attrs;
+  >
+
+<!--=================== Horizontal Rule ==================================-->
+
+<!ELEMENT hr EMPTY>
+<!ATTLIST hr
+  %attrs;
+  align       (left|center|right) #IMPLIED
+  noshade     (noshade)      #IMPLIED
+  size        %Pixels;       #IMPLIED
+  width       %Length;       #IMPLIED
+  >
+
+<!--=================== Preformatted Text ================================-->
+
+<!-- content is %Inline; excluding 
+        "img|object|applet|big|small|sub|sup|font|basefont" -->
+
+<!ELEMENT pre %pre.content;>
+<!ATTLIST pre
+  %attrs;
+  width       %Number;      #IMPLIED
+  xml:space   (preserve)    #FIXED 'preserve'
+  >
+
+<!--=================== Block-like Quotes ================================-->
+
+<!ELEMENT blockquote %Flow;>
+<!ATTLIST blockquote
+  %attrs;
+  cite        %URI;          #IMPLIED
+  >
+
+<!--=================== Text alignment ===================================-->
+
+<!-- center content -->
+<!ELEMENT center %Flow;>
+<!ATTLIST center
+  %attrs;
+  >
+
+<!--=================== Inserted/Deleted Text ============================-->
+
+<!--
+  ins/del are allowed in block and inline content, but its
+  inappropriate to include block content within an ins element
+  occurring in inline content.
+-->
+<!ELEMENT ins %Flow;>
+<!ATTLIST ins
+  %attrs;
+  cite        %URI;          #IMPLIED
+  datetime    %Datetime;     #IMPLIED
+  >
+
+<!ELEMENT del %Flow;>
+<!ATTLIST del
+  %attrs;
+  cite        %URI;          #IMPLIED
+  datetime    %Datetime;     #IMPLIED
+  >
+
+<!--================== The Anchor Element ================================-->
+
+<!-- content is %Inline; except that anchors shouldn't be nested -->
+
+<!ELEMENT a %a.content;>
+<!ATTLIST a
+  %attrs;
+  %focus;
+  charset     %Charset;      #IMPLIED
+  type        %ContentType;  #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  href        %URI;          #IMPLIED
+  hreflang    %LanguageCode; #IMPLIED
+  rel         %LinkTypes;    #IMPLIED
+  rev         %LinkTypes;    #IMPLIED
+  shape       %Shape;        "rect"
+  coords      %Coords;       #IMPLIED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!--===================== Inline Elements ================================-->
+
+<!ELEMENT span %Inline;> <!-- generic language/style container -->
+<!ATTLIST span
+  %attrs;
+  >
+
+<!ELEMENT bdo %Inline;>  <!-- I18N BiDi over-ride -->
+<!ATTLIST bdo
+  %coreattrs;
+  %events;
+  lang        %LanguageCode; #IMPLIED
+  xml:lang    %LanguageCode; #IMPLIED
+  dir         (ltr|rtl)      #REQUIRED
+  >
+
+<!ELEMENT br EMPTY>   <!-- forced line break -->
+<!ATTLIST br
+  %coreattrs;
+  clear       (left|all|right|none) "none"
+  >
+
+<!ELEMENT em %Inline;>   <!-- emphasis -->
+<!ATTLIST em %attrs;>
+
+<!ELEMENT strong %Inline;>   <!-- strong emphasis -->
+<!ATTLIST strong %attrs;>
+
+<!ELEMENT dfn %Inline;>   <!-- definitional -->
+<!ATTLIST dfn %attrs;>
+
+<!ELEMENT code %Inline;>   <!-- program code -->
+<!ATTLIST code %attrs;>
+
+<!ELEMENT samp %Inline;>   <!-- sample -->
+<!ATTLIST samp %attrs;>
+
+<!ELEMENT kbd %Inline;>  <!-- something user would type -->
+<!ATTLIST kbd %attrs;>
+
+<!ELEMENT var %Inline;>   <!-- variable -->
+<!ATTLIST var %attrs;>
+
+<!ELEMENT cite %Inline;>   <!-- citation -->
+<!ATTLIST cite %attrs;>
+
+<!ELEMENT abbr %Inline;>   <!-- abbreviation -->
+<!ATTLIST abbr %attrs;>
+
+<!ELEMENT acronym %Inline;>   <!-- acronym -->
+<!ATTLIST acronym %attrs;>
+
+<!ELEMENT q %Inline;>   <!-- inlined quote -->
+<!ATTLIST q
+  %attrs;
+  cite        %URI;          #IMPLIED
+  >
+
+<!ELEMENT sub %Inline;> <!-- subscript -->
+<!ATTLIST sub %attrs;>
+
+<!ELEMENT sup %Inline;> <!-- superscript -->
+<!ATTLIST sup %attrs;>
+
+<!ELEMENT tt %Inline;>   <!-- fixed pitch font -->
+<!ATTLIST tt %attrs;>
+
+<!ELEMENT i %Inline;>   <!-- italic font -->
+<!ATTLIST i %attrs;>
+
+<!ELEMENT b %Inline;>   <!-- bold font -->
+<!ATTLIST b %attrs;>
+
+<!ELEMENT big %Inline;>   <!-- bigger font -->
+<!ATTLIST big %attrs;>
+
+<!ELEMENT small %Inline;>   <!-- smaller font -->
+<!ATTLIST small %attrs;>
+
+<!ELEMENT u %Inline;>   <!-- underline -->
+<!ATTLIST u %attrs;>
+
+<!ELEMENT s %Inline;>   <!-- strike-through -->
+<!ATTLIST s %attrs;>
+
+<!ELEMENT strike %Inline;>   <!-- strike-through -->
+<!ATTLIST strike %attrs;>
+
+<!ELEMENT basefont EMPTY>  <!-- base font size -->
+<!ATTLIST basefont
+  id          ID             #IMPLIED
+  size        CDATA          #REQUIRED
+  color       %Color;        #IMPLIED
+  face        CDATA          #IMPLIED
+  >
+
+<!ELEMENT font %Inline;> <!-- local change to font -->
+<!ATTLIST font
+  %coreattrs;
+  %i18n;
+  size        CDATA          #IMPLIED
+  color       %Color;        #IMPLIED
+  face        CDATA          #IMPLIED
+  >
+
+<!--==================== Object ======================================-->
+<!--
+  object is used to embed objects as part of HTML pages.
+  param elements should precede other content. Parameters
+  can also be expressed as attribute/value pairs on the
+  object element itself when brevity is desired.
+-->
+
+<!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST object
+  %attrs;
+  declare     (declare)      #IMPLIED
+  classid     %URI;          #IMPLIED
+  codebase    %URI;          #IMPLIED
+  data        %URI;          #IMPLIED
+  type        %ContentType;  #IMPLIED
+  codetype    %ContentType;  #IMPLIED
+  archive     %UriList;      #IMPLIED
+  standby     %Text;         #IMPLIED
+  height      %Length;       #IMPLIED
+  width       %Length;       #IMPLIED
+  usemap      %URI;          #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  align       %ImgAlign;     #IMPLIED
+  border      %Pixels;       #IMPLIED
+  hspace      %Pixels;       #IMPLIED
+  vspace      %Pixels;       #IMPLIED
+  >
+
+<!--
+  param is used to supply a named property value.
+  In XML it would seem natural to follow RDF and support an
+  abbreviated syntax where the param elements are replaced
+  by attribute value pairs on the object start tag.
+-->
+<!ELEMENT param EMPTY>
+<!ATTLIST param
+  id          ID             #IMPLIED
+  name        CDATA          #REQUIRED
+  value       CDATA          #IMPLIED
+  valuetype   (data|ref|object) "data"
+  type        %ContentType;  #IMPLIED
+  >
+
+<!--=================== Java applet ==================================-->
+<!--
+  One of code or object attributes must be present.
+  Place param elements before other content.
+-->
+<!ELEMENT applet (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST applet
+  %coreattrs;
+  codebase    %URI;          #IMPLIED
+  archive     CDATA          #IMPLIED
+  code        CDATA          #IMPLIED
+  object      CDATA          #IMPLIED
+  alt         %Text;         #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  width       %Length;       #REQUIRED
+  height      %Length;       #REQUIRED
+  align       %ImgAlign;     #IMPLIED
+  hspace      %Pixels;       #IMPLIED
+  vspace      %Pixels;       #IMPLIED
+  >
+
+<!--=================== Images ===========================================-->
+
+<!--
+   To avoid accessibility problems for people who aren't
+   able to see the image, you should provide a text
+   description using the alt and longdesc attributes.
+   In addition, avoid the use of server-side image maps.
+-->
+
+<!ELEMENT img EMPTY>
+<!ATTLIST img
+  %attrs;
+  src         %URI;          #REQUIRED
+  alt         %Text;         #REQUIRED
+  name        NMTOKEN        #IMPLIED
+  longdesc    %URI;          #IMPLIED
+  height      %Length;       #IMPLIED
+  width       %Length;       #IMPLIED
+  usemap      %URI;          #IMPLIED
+  ismap       (ismap)        #IMPLIED
+  align       %ImgAlign;     #IMPLIED
+  border      %Length;       #IMPLIED
+  hspace      %Pixels;       #IMPLIED
+  vspace      %Pixels;       #IMPLIED
+  >
+
+<!-- usemap points to a map element which may be in this document
+  or an external document, although the latter is not widely supported -->
+
+<!--================== Client-side image maps ============================-->
+
+<!-- These can be placed in the same document or grouped in a
+     separate document although this isn't yet widely supported -->
+
+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>
+<!ATTLIST map
+  %i18n;
+  %events;
+  id          ID             #REQUIRED
+  class       CDATA          #IMPLIED
+  style       %StyleSheet;   #IMPLIED
+  title       %Text;         #IMPLIED
+  name        CDATA          #IMPLIED
+  >
+
+<!ELEMENT area EMPTY>
+<!ATTLIST area
+  %attrs;
+  %focus;
+  shape       %Shape;        "rect"
+  coords      %Coords;       #IMPLIED
+  href        %URI;          #IMPLIED
+  nohref      (nohref)       #IMPLIED
+  alt         %Text;         #REQUIRED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!--================ Forms ===============================================-->
+
+<!ELEMENT form %form.content;>   <!-- forms shouldn't be nested -->
+
+<!ATTLIST form
+  %attrs;
+  action      %URI;          #REQUIRED
+  method      (get|post)     "get"
+  name        NMTOKEN        #IMPLIED
+  enctype     %ContentType;  "application/x-www-form-urlencoded"
+  onsubmit    %Script;       #IMPLIED
+  onreset     %Script;       #IMPLIED
+  accept      %ContentTypes; #IMPLIED
+  accept-charset %Charsets;  #IMPLIED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!--
+  Each label must not contain more than ONE field
+  Label elements shouldn't be nested.
+-->
+<!ELEMENT label %Inline;>
+<!ATTLIST label
+  %attrs;
+  for         IDREF          #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  >
+
+<!ENTITY % InputType
+  "(text | password | checkbox |
+    radio | submit | reset |
+    file | hidden | image | button)"
+   >
+
+<!-- the name attribute is required for all but submit & reset -->
+
+<!ELEMENT input EMPTY>     <!-- form control -->
+<!ATTLIST input
+  %attrs;
+  %focus;
+  type        %InputType;    "text"
+  name        CDATA          #IMPLIED
+  value       CDATA          #IMPLIED
+  checked     (checked)      #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  readonly    (readonly)     #IMPLIED
+  size        CDATA          #IMPLIED
+  maxlength   %Number;       #IMPLIED
+  src         %URI;          #IMPLIED
+  alt         CDATA          #IMPLIED
+  usemap      %URI;          #IMPLIED
+  onselect    %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  accept      %ContentTypes; #IMPLIED
+  align       %ImgAlign;     #IMPLIED
+  >
+
+<!ELEMENT select (optgroup|option)+>  <!-- option selector -->
+<!ATTLIST select
+  %attrs;
+  name        CDATA          #IMPLIED
+  size        %Number;       #IMPLIED
+  multiple    (multiple)     #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  >
+
+<!ELEMENT optgroup (option)+>   <!-- option group -->
+<!ATTLIST optgroup
+  %attrs;
+  disabled    (disabled)     #IMPLIED
+  label       %Text;         #REQUIRED
+  >
+
+<!ELEMENT option (#PCDATA)>     <!-- selectable choice -->
+<!ATTLIST option
+  %attrs;
+  selected    (selected)     #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  label       %Text;         #IMPLIED
+  value       CDATA          #IMPLIED
+  >
+
+<!ELEMENT textarea (#PCDATA)>     <!-- multi-line text field -->
+<!ATTLIST textarea
+  %attrs;
+  %focus;
+  name        CDATA          #IMPLIED
+  rows        %Number;       #REQUIRED
+  cols        %Number;       #REQUIRED
+  disabled    (disabled)     #IMPLIED
+  readonly    (readonly)     #IMPLIED
+  onselect    %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  >
+
+<!--
+  The fieldset element is used to group form fields.
+  Only one legend element should occur in the content
+  and if present should only be preceded by whitespace.
+-->
+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>
+<!ATTLIST fieldset
+  %attrs;
+  >
+
+<!ENTITY % LAlign "(top|bottom|left|right)">
+
+<!ELEMENT legend %Inline;>     <!-- fieldset label -->
+<!ATTLIST legend
+  %attrs;
+  accesskey   %Character;    #IMPLIED
+  align       %LAlign;       #IMPLIED
+  >
+
+<!--
+ Content is %Flow; excluding a, form, form controls, iframe
+--> 
+<!ELEMENT button %button.content;>  <!-- push button -->
+<!ATTLIST button
+  %attrs;
+  %focus;
+  name        CDATA          #IMPLIED
+  value       CDATA          #IMPLIED
+  type        (button|submit|reset) "submit"
+  disabled    (disabled)     #IMPLIED
+  >
+
+<!-- single-line text input control (DEPRECATED) -->
+<!ELEMENT isindex EMPTY>
+<!ATTLIST isindex
+  %coreattrs;
+  %i18n;
+  prompt      %Text;         #IMPLIED
+  >
+
+<!--======================= Tables =======================================-->
+
+<!-- Derived from IETF HTML table standard, see [RFC1942] -->
+
+<!--
+ The border attribute sets the thickness of the frame around the
+ table. The default units are screen pixels.
+
+ The frame attribute specifies which parts of the frame around
+ the table should be rendered. The values are not the same as
+ CALS to avoid a name clash with the valign attribute.
+-->
+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
+
+<!--
+ The rules attribute defines which rules to draw between cells:
+
+ If rules is absent then assume:
+     "none" if border is absent or border="0" otherwise "all"
+-->
+
+<!ENTITY % TRules "(none | groups | rows | cols | all)">
+  
+<!-- horizontal placement of table relative to document -->
+<!ENTITY % TAlign "(left|center|right)">
+
+<!-- horizontal alignment attributes for cell contents
+
+  char        alignment char, e.g. char=':'
+  charoff     offset for alignment char
+-->
+<!ENTITY % cellhalign
+  "align      (left|center|right|justify|char) #IMPLIED
+   char       %Character;    #IMPLIED
+   charoff    %Length;       #IMPLIED"
+  >
+
+<!-- vertical alignment attributes for cell contents -->
+<!ENTITY % cellvalign
+  "valign     (top|middle|bottom|baseline) #IMPLIED"
+  >
+
+<!ELEMENT table
+     (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>
+<!ELEMENT caption  %Inline;>
+<!ELEMENT thead    (tr)+>
+<!ELEMENT tfoot    (tr)+>
+<!ELEMENT tbody    (tr)+>
+<!ELEMENT colgroup (col)*>
+<!ELEMENT col      EMPTY>
+<!ELEMENT tr       (th|td)+>
+<!ELEMENT th       %Flow;>
+<!ELEMENT td       %Flow;>
+
+<!ATTLIST table
+  %attrs;
+  summary     %Text;         #IMPLIED
+  width       %Length;       #IMPLIED
+  border      %Pixels;       #IMPLIED
+  frame       %TFrame;       #IMPLIED
+  rules       %TRules;       #IMPLIED
+  cellspacing %Length;       #IMPLIED
+  cellpadding %Length;       #IMPLIED
+  align       %TAlign;       #IMPLIED
+  bgcolor     %Color;        #IMPLIED
+  >
+
+<!ENTITY % CAlign "(top|bottom|left|right)">
+
+<!ATTLIST caption
+  %attrs;
+  align       %CAlign;       #IMPLIED
+  >
+
+<!--
+colgroup groups a set of col elements. It allows you to group
+several semantically related columns together.
+-->
+<!ATTLIST colgroup
+  %attrs;
+  span        %Number;       "1"
+  width       %MultiLength;  #IMPLIED
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!--
+ col elements define the alignment properties for cells in
+ one or more columns.
+
+ The width attribute specifies the width of the columns, e.g.
+
+     width=64        width in screen pixels
+     width=0.5*      relative width of 0.5
+
+ The span attribute causes the attributes of one
+ col element to apply to more than one column.
+-->
+<!ATTLIST col
+  %attrs;
+  span        %Number;       "1"
+  width       %MultiLength;  #IMPLIED
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!--
+    Use thead to duplicate headers when breaking table
+    across page boundaries, or for static headers when
+    tbody sections are rendered in scrolling panel.
+
+    Use tfoot to duplicate footers when breaking table
+    across page boundaries, or for static footers when
+    tbody sections are rendered in scrolling panel.
+
+    Use multiple tbody sections when rules are needed
+    between groups of table rows.
+-->
+<!ATTLIST thead
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tfoot
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tbody
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tr
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  bgcolor     %Color;        #IMPLIED
+  >
+
+<!-- Scope is simpler than headers attribute for common tables -->
+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
+
+<!-- th is for headers, td for data and for cells acting as both -->
+
+<!ATTLIST th
+  %attrs;
+  abbr        %Text;         #IMPLIED
+  axis        CDATA          #IMPLIED
+  headers     IDREFS         #IMPLIED
+  scope       %Scope;        #IMPLIED
+  rowspan     %Number;       "1"
+  colspan     %Number;       "1"
+  %cellhalign;
+  %cellvalign;
+  nowrap      (nowrap)       #IMPLIED
+  bgcolor     %Color;        #IMPLIED
+  width       %Length;       #IMPLIED
+  height      %Length;       #IMPLIED
+  >
+
+<!ATTLIST td
+  %attrs;
+  abbr        %Text;         #IMPLIED
+  axis        CDATA          #IMPLIED
+  headers     IDREFS         #IMPLIED
+  scope       %Scope;        #IMPLIED
+  rowspan     %Number;       "1"
+  colspan     %Number;       "1"
+  %cellhalign;
+  %cellvalign;
+  nowrap      (nowrap)       #IMPLIED
+  bgcolor     %Color;        #IMPLIED
+  width       %Length;       #IMPLIED
+  height      %Length;       #IMPLIED
+  >
+
diff --git a/lib/xml-apis.jar b/lib/xml-apis.jar
new file mode 100644
index 0000000..2dd8377
--- /dev/null
+++ b/lib/xml-apis.jar
Binary files differ
diff --git a/prereq.xml b/prereq.xml
new file mode 100644
index 0000000..13c5199
--- /dev/null
+++ b/prereq.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0"?>
+<!--
+ Copyright 2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- this file contains prerequisites and will be included into build.xml -->
+<!-- ==================================================================== -->
+<project name="prereq">
+
+<!-- include the additional tasks from ant-contrib.                       -->
+<!-- we need for example the <for> task.                                  -->
+<!--                                                                      -->
+<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
+
+<!-- Catalog of public W3C resources and their local copies.              -->
+<!-- These entitity definitions will magically injected into              -->
+<!-- xslt transformation and validation processes.                        -->
+<!--                                                                      -->
+<xmlcatalog id="w3c-catalog">
+    <entity publicId="-//W3C//DTD XHTML 1.0 Transitional//EN"
+            location="lib/xhtml1-transitional.dtd" />
+    <entity publicId="-//W3C//DTD XHTML 1.0 Strict//EN"
+            location="lib/xhtml1-strict.dtd" />
+    <entity publicId="-//W3C//ENTITIES Latin 1 for XHTML//EN"
+            location="lib/xhtml-lat1.ent" />
+    <entity publicId="-//W3C//ENTITIES Symbols for XHTML//EN"
+            location="lib/xhtml-symbol.ent" />
+    <entity publicId="-//W3C//ENTITIES Special for XHTML//EN"
+            location="lib/xhtml-special.ent" />
+</xmlcatalog>
+
+
+<!-- There are some files that are not intended to be modified or         -->
+<!-- transformed by the build process in any way.                         -->
+<!--                                                                      -->
+<patternset id="excludes">
+    <exclude name="build/*.xml" />
+    <exclude name="mod/allmodules.xml*" />
+    <exclude name="faq/categories.xml*" />
+    <exclude name="style/*.xml" />
+    <exclude name="style/lang/*.xml" />
+    <exclude name="style/xsl/util/*.xml" />
+    <exclude name="style/_generated/*.xml" />
+
+    <!-- for chm build -->
+    <exclude name="_chm/*/mod/allmodules.xml*" />
+    <exclude name="_chm/*/faq/categories.xml*" />
+    <exclude name="_chm/*/style/*.xml" />
+    <exclude name="_chm/*/style/lang/*.xml" />
+    <exclude name="_chm/*/style/xsl/util/*.xml" />
+    <exclude name="_chm/*/style/_generated/*.xml" />
+
+    <!-- for offline build -->
+    <exclude name="_off/*/mod/allmodules.xml*" />
+    <exclude name="_off/*/faq/categories.xml*" />
+    <exclude name="_off/*/style/*.xml" />
+    <exclude name="_off/*/style/lang/*.xml" />
+    <exclude name="_off/*/style/xsl/util/*.xml" />
+    <exclude name="_off/*/style/_generated/*.xml" />
+</patternset>
+
+
+<!-- Exclude scratch directories as well                                  -->
+<!--                                                                      -->
+<patternset id="scratch">
+    <exclude name="_chm/**/*" />
+    <exclude name="_chm" />
+    <exclude name="_off/**/*" />
+    <exclude name="_off" />
+    <exclude name="_tools/**/*" />
+    <exclude name="_tools" />
+    <exclude name="_dist/**/*" />
+    <exclude name="_dist" />
+    <exclude name="style/_generated/**/*" />
+    <exclude name="style/_generated" />
+</patternset>
+
+
+<!-- Exclude helper and non-xml directories                               -->
+<!--                                                                      -->
+<patternset id="baddirs">
+    <exclude name="build/**" />
+    <exclude name="style/**" />
+    <exclude name="images/**" />
+</patternset>
+
+
+<!-- load version dependent properties -->
+<property prefix="ap" file="../style/build.properties" />
+
+</project>