r26 - in manual/trunk: . entities

Sebastian Bergmann at BerliOS <[email protected]> Tue, 19 Oct 2004 13:11:40 +0200
Newsgroups gmane.comp.web.phpopentracker.cvs
Message-ID <[email protected]>
Author: s_bergmann
Date: 2004-10-19 13:11:39 +0200 (Tue, 19 Oct 2004)
New Revision: 26

Added:
   manual/trunk/entities/
   manual/trunk/entities/online.ent
   manual/trunk/entities/print.ent
Removed:
   manual/trunk/entities.ent
Modified:
   manual/trunk/build
   manual/trunk/build.conf-dist
Log:
Flush.

Modified: manual/trunk/build
===================================================================
--- manual/trunk/build	2004-10-18 09:25:04 UTC (rev 25)
+++ manual/trunk/build	2004-10-19 11:11:39 UTC (rev 26)
@@ -1,544 +1,565 @@
-#!/usr/local/bin/php -Cq
-<?php
-error_reporting(E_ALL);
-set_time_limit(0);
-ob_implicit_flush(true);
-
-require_once 'System.php';
-
-if (!@include_once('build.conf')) {
-  include_once('build.conf-dist');
-}
-
-$defaultFormats = array(
-  'docbook-toys' => array('rtf'),
-  'xsltproc'     => array('html-chunked', 'pdf')
-);
-
-$supportedFormats = array(
-  'docbook-toys' => array(
-    'dvi',
-    'pdf',
-    'ps',
-    'rtf',
-    'tex'
-  ),
-
-  'xsltproc' => array(
-    'html',
-    'html-chunked',
-    'fo',
-    'pdf',
-    'ps',
-    'rtf',
-    'text',
-    'xml'
-  )
-);
-
-$defaultLanguages = array(
-  'de',
-  'en'
-);
-
-$supportedLanguages = array(
-  'de',
-  'en'
-);
-
-$formats   = $defaultFormats[PROCESSOR];
-$highlight = true;
-$languages = $defaultLanguages;
-$tempFiles = array();
-
-$options = Console_Getopt::getopt(
-  $argv,
-  '',
-  array(
-    'format=',
-    'language=',
-    'no-highlighting'
-  )
-);
-
-foreach ($options[0] as $option) {
-  switch ($option[0]) {
-    case '--format': {
-      if ($option[1] == 'all') {
-        $formats = $supportedFormats[PROCESSOR];
-      } else {
-        $formats     = array();
-        $tempFormats = explode(',', $option[1]);
-
-        foreach ($tempFormats as $tempFormat) {
-          if (in_array($tempFormat, $supportedFormats[PROCESSOR])) {
-            $formats[] = $tempFormat;
-          }
-        }
-
-        if (empty($formats)) {
-          $formats = $defaultFormats[PROCESSOR];
-        }
-      }
-
-    }
-    break;
-
-    case '--no-highlighting': {
-      $highlight = false;
-    }
-    break;
-
-    case '--language': {
-      if ($option[1] == 'all') {
-        $languages = $supportedLanguages;
-      } else {
-        $languages     = array();
-        $tempLanguages = explode(',', $option[1]);
-
-        foreach ($tempLanguages as $tempLanguage) {
-          if (in_array($tempLanguage, $supportedLanguages)) {
-            $languages[] = $tempLanguage;
-          }
-        }
-
-        if (empty($languages)) {
-          $languages = $defaultLanguages;
-        }
-      }
-    }
-    break;
-  }
-}
-
-foreach ($languages as $language) {
-  foreach ($formats as $format) {
-    render($format, $language, $highlight);
-  }
-}
-
-function render($format, $language, $highlight) {
-  static $built;
-
-  printf(
-    "Rendering %s/%s: ",
-
-    $language,
-    $format
-  );
-
-  $start = getMicrotime();
-
-  $doHighlight = $highlight;
-  $inputFile   = $language . '.xml';
-
-  $outputDirectory = sprintf(
-    'output%s%s',
-    DIRECTORY_SEPARATOR,
-    $language
-  );
-
-  switch ($format) {
-    case 'fo':
-    case 'pdf':
-    case 'xml': {
-      $outputFileSuffix = $format;
-    }
-    break;
-
-    case 'text': {
-      $outputFileSuffix = 'txt';
-    }
-    break;
-
-    default: {
-      $outputFileSuffix = 'html';
-    }
-  }
-
-  $outputFile = sprintf(
-    'output%s%s%sphpOpenTracker.%s',
-    DIRECTORY_SEPARATOR,
-    $language,
-    DIRECTORY_SEPARATOR,
-    $outputFileSuffix
-  );
-
-  prepareFile(
-    $inputFile,
-    array(
-      '{DTD_PATH}'
-    ),
-    array(
-      DTD_PATH
-    )
-  );
-
-  prepareFile(
-    'chapters/' . $language . '/bookinfo.xml',
-    array(
-      '{svnversion}'
-    ),
-    array(
-      shell_exec('svnversion .')
-    )
-  );
-
-  if (PROCESSOR != 'xsltproc') {
-    exec(
-      sprintf(
-        'java com.elharo.xml.xinclude.SAXXIncluder %s >temp.xml',
-        $inputFile
-      )
-    );
-
-    array_push($GLOBALS['tempFiles'], 'temp.xml');
-
-    $inputFile = 'temp.xml';
-  }
-
-  if (PROCESSOR == 'xsltproc' &&
-      $format   == 'xml') {
-    exec(
-      sprintf(
-        'xmllint --noent --xinclude %s >%s',
-        $inputFile,
-        $outputFile
-      )
-    );
-  } else {
-    switch (PROCESSOR) {
-      case 'docbook-toys': {
-        exec(
-          sprintf(
-            'db2%s -o %s',
-
-            $format,
-            $inputFile
-          )
-        );
-
-        exec(
-          sprintf(
-            'mv temp.%s output/%s/print.%s',
-            $format,
-            $language,
-            $inputFile
-          )
-        );
-
-        array_push($GLOBALS['tempFiles'], 'CATALOG.local');
-        array_push($GLOBALS['tempFiles'], 'suse-html.dsl');
-        array_push($GLOBALS['tempFiles'], 'suse-print.dsl');
-      }
-      break;
-
-      case 'xsltproc': {
-        switch ($format) {
-          case 'pdf':
-          case 'rtf': {
-            $renderFormat = 'fo';
-          }
-          break;
-
-          default: {
-            $renderFormat = $format;
-          }
-        }
-
-        $stylesheetFile = prepareStylesheet(
-          $renderFormat,
-          $language
-        );
-
-        switch ($format) {
-          case 'fo':
-          case 'html':
-          case 'pdf':
-          case 'rtf':
-          case 'text': {
-            if ($format == 'pdf') {
-              $tempOutputFile = str_replace('.pdf', '.fo', $outputFile);
-            }
-
-            else if ($format == 'text') {
-              $tempOutputFile = $outputFile . '.tmp.html';
-              array_push($GLOBALS['tempFiles'], $tempOutputFile);
-            }
-
-            if (!isset($built[$renderFormat][$language])) {
-              exec(
-                sprintf(
-                  'xsltproc --xinclude -o %s %s %s',
-
-                  isset($tempOutputFile) ? $tempOutputFile : $outputFile,
-                  $stylesheetFile,
-                  $inputFile
-                )
-              );
-
-              $built[$renderFormat][$language] = true;
-            }
-
-            if ($format == 'fo') {
-              $doHighlight = false;
-            }
-
-            else if ($format == 'pdf' ||
-                     $format == 'ps') {
-              exec(
-                sprintf(
-                  'fop -fo %s -%s %s',
-
-                  $tempOutputFile,
-                  $format,
-                  $outputFile
-                )
-              );
-
-              $doHighlight = false;
-            }
-
-            else if ($format == 'text') {
-              exec(
-                sprintf(
-                  'lynx -dump %s > %s',
-
-                  str_replace('\\', '/', $tempOutputFile),
-                  $outputFile
-                )
-              );
-
-              $doHighlight = false;
-            }
-
-            else if ($format == 'rtf') {
-              exec(
-                sprintf(
-                  'fo2rtf %s %s',
-
-                  $outputFile,
-                  str_replace('.fo', '.rtf', $outputFile)
-                )
-              );
-
-              $doHighlight = false;
-            }
-          }
-          break;
-
-          case 'html-chunked': {
-            if (!isset($built[$renderFormat][$language])) {
-              exec(
-                sprintf(
-                  'xsltproc --xinclude %s %s',
-
-                  $stylesheetFile,
-                  $inputFile
-                )
-              );
-
-              $built[$renderFormat][$language] = true;
-            }
-          }
-          break;
-        }
-
-        if ($doHighlight) {
-          if ($format == 'html') {
-            highlightFile($outputFile);
-          }
-
-          else if ($format == 'html-chunked') {
-            highlightDirectory($outputDirectory);
-          }
-        }
-      }
-      break;
-    }
-  }
-
-  while ($tempFile = array_pop($GLOBALS['tempFiles'])) {
-    @unlink($tempFile);
-  }
-
-  $end = getMicrotime();
-
-  if (extension_loaded('bcmath')) {
-    $time = bcsub($end, $start, 6);
-  } else {
-    $time = $end - $start;
-  }
-
-  printf(
-    "%01.2f seconds\n",
-
-    $time
-  );
-}
-
-function highlight($string) {
-  if (PROCESSOR == 'xsltproc') {
-    $string[1] = str_replace(array('
', '

'), '', $string[1]);
-  }
-
-  if (strpos($string[1], '?&gt;')    === false ||
-      strpos($string[1], '&lt;?xml') !== false) {
-    return '<pre class="programlisting">' . $string[1] . '</pre>';
-  }
-
-  return str_replace(
-    array(
-      "\n",
-      '<br /><font color="#113d73">&lt;?php',
-      '?&gt;<br /></font><br /></font>'
-    ),
-    array(
-      '',
-      '<font color="#113d73">&lt;?php',
-      '?&gt;<br /></font></font>'
-    ),
-    sprintf(
-      '<pre class="programlisting">%s</pre>',
-      highlight_string(
-        str_replace(
-          array(
-            '&lt;',
-            '&gt;',
-            '&amp;',
-            '&quot;'
-          ),
-          array(
-            '<',
-            '>',
-            '&',
-            '"'
-          ),
-          $string[1]
-        ),
-        1
-      )
-    )
-  );
-}
-
-function highlightDirectory($directory) {
-  if ($dir = @opendir($directory)) {
-    while (false !== ($filename = @readdir($dir))) {
-      if (ereg('.html$', $filename) &&
-          $filename != 'phpOpenTracker.html') {
-        highlightFile($directory . DIRECTORY_SEPARATOR . $filename);
-      }
-    }
-
-    @closedir($dir);
-  }
-}
-
-function highlightFile($file) {
-  if ($buffer = @join('', @file($file))) {
-    $buffer = preg_replace_callback(
-      '!<pre class="programlisting">(.+)</pre>!Us',
-      'highlight',
-      $buffer
-    );
-
-    if ($fp = @fopen($file, 'w')) {
-      @fwrite($fp, $buffer);
-      @fclose($fp);
-    } else {
-      echo "Cannot write to $file.\n";
-      exit;
-    }
-  } else {
-    echo "Cannot open $file.\n";
-    exit;
-  }
-}
-
-function prepareFile($filename, $variables, $values) {
-  if ($file = @implode('', @file($filename . '.in'))) {
-    $file = str_replace($variables, $values, $file);
-
-    if ($fp = @fopen($filename, 'w')) {
-      @fwrite($fp, $file);
-      @fclose($fp);
-    } else {
-      echo "Cannot create $filename.\n";
-      exit;
-    }
-
-    array_push($GLOBALS['tempFiles'], $filename);
-  }
-}
-
-function prepareStylesheet($format, $language) {
-  switch ($format) {
-    case 'fo':
-    case 'rtf': {
-      $stylesheetFile = sprintf(
-        'stylesheets%sfo.xsl',
-        DIRECTORY_SEPARATOR
-      );
-    }
-    break;
-
-    default: {
-      $stylesheetFile = sprintf(
-        'stylesheets%s%s.xsl',
-        DIRECTORY_SEPARATOR,
-        $format
-      );
-    }
-    break;
-  }
-
-  prepareFile(
-    sprintf(
-      'stylesheets%scommon.xsl',
-      DIRECTORY_SEPARATOR
-    ),
-    array(
-      '{language}',
-      '{xsl_root}'
-    ),
-    array(
-      $language,
-      XSL_ROOT
-    )
-  );
-
-  prepareFile(
-    sprintf(
-      'stylesheets%snonhtml-common.xsl',
-      DIRECTORY_SEPARATOR
-    ),
-    array(
-      '{xsl_root}'
-    ),
-    array(
-      XSL_ROOT
-    )
-  );
-
-  prepareFile(
-    $stylesheetFile,
-    array(
-      '{language}',
-      '{xsl_root}'
-    ),
-    array(
-      $language,
-      XSL_ROOT
-    )
-  );
-
-  return $stylesheetFile;
-}
-
-function getMicrotime() {
-  $microtime = explode(' ', microtime());
-
-  return $microtime[1] . substr($microtime[0], 1);
-}
-?>
+#!/usr/local/bin/php -Cq
+<?php
+error_reporting(E_ALL);
+set_time_limit(0);
+ob_implicit_flush(true);
+
+require_once 'System.php';
+
+if (!@include_once('build.conf')) {
+  include_once('build.conf-dist');
+}
+
+$defaultFormats = array(
+  'docbook-toys' => array('rtf'),
+  'xsltproc'     => array('html-chunked', 'pdf')
+);
+
+$supportedFormats = array(
+  'docbook-toys' => array(
+    'dvi',
+    'pdf',
+    'ps',
+    'rtf',
+    'tex'
+  ),
+
+  'xsltproc' => array(
+    'html',
+    'html-chunked',
+    'fo',
+    'pdf',
+    'ps',
+    'rtf',
+    'tex',
+    'text',
+    'xml'
+  )
+);
+
+$defaultLanguages = array(
+  'de',
+  'en'
+);
+
+$supportedLanguages = array(
+  'de',
+  'en'
+);
+
+$formats   = $defaultFormats[PROCESSOR];
+$highlight = true;
+$languages = $defaultLanguages;
+$tempFiles = array();
+
+$options = Console_Getopt::getopt(
+  $argv,
+  '',
+  array(
+    'format=',
+    'language=',
+    'no-highlighting'
+  )
+);
+
+foreach ($options[0] as $option) {
+  switch ($option[0]) {
+    case '--format': {
+      if ($option[1] == 'all') {
+        $formats = $supportedFormats[PROCESSOR];
+      } else {
+        $formats     = array();
+        $tempFormats = explode(',', $option[1]);
+
+        foreach ($tempFormats as $tempFormat) {
+          if (in_array($tempFormat, $supportedFormats[PROCESSOR])) {
+            $formats[] = $tempFormat;
+          }
+        }
+
+        if (empty($formats)) {
+          $formats = $defaultFormats[PROCESSOR];
+        }
+      }
+
+    }
+    break;
+
+    case '--no-highlighting': {
+      $highlight = false;
+    }
+    break;
+
+    case '--language': {
+      if ($option[1] == 'all') {
+        $languages = $supportedLanguages;
+      } else {
+        $languages     = array();
+        $tempLanguages = explode(',', $option[1]);
+
+        foreach ($tempLanguages as $tempLanguage) {
+          if (in_array($tempLanguage, $supportedLanguages)) {
+            $languages[] = $tempLanguage;
+          }
+        }
+
+        if (empty($languages)) {
+          $languages = $defaultLanguages;
+        }
+      }
+    }
+    break;
+  }
+}
+
+foreach ($languages as $language) {
+  foreach ($formats as $format) {
+    render($format, $language, $highlight);
+  }
+}
+
+function render($format, $language, $highlight) {
+  static $built;
+
+  printf(
+    "Rendering %s/%s: ",
+
+    $language,
+    $format
+  );
+
+  $start = getMicrotime();
+
+  $doHighlight = $highlight;
+  $inputFile   = $language . '.xml';
+
+  $outputDirectory = sprintf(
+    'output%s%s',
+    DIRECTORY_SEPARATOR,
+    $language
+  );
+
+  switch ($format) {
+    case 'fo':
+    case 'pdf':
+    case 'tex':
+    case 'xml': {
+      $outputFileSuffix = $format;
+    }
+    break;
+
+    case 'text': {
+      $outputFileSuffix = 'txt';
+    }
+    break;
+
+    default: {
+      $outputFileSuffix = 'html';
+    }
+  }
+
+  $outputFile = sprintf(
+    'output%s%s%sphpOpenTracker.%s',
+    DIRECTORY_SEPARATOR,
+    $language,
+    DIRECTORY_SEPARATOR,
+    $outputFileSuffix
+  );
+
+  prepareFile(
+    $inputFile,
+    array(
+      '{DTD_PATH}'
+    ),
+    array(
+      DTD_PATH
+    )
+  );
+
+  prepareFile(
+    'chapters/' . $language . '/bookinfo.xml',
+    array(
+      '{svnversion}'
+    ),
+    array(
+      shell_exec('svnversion .')
+    )
+  );
+
+  if ($format == 'html' || $format == 'html-chunked') {
+      exec('cp entities/online.ent entities.ent');
+  } else {
+      exec('cp entities/print.ent entities.ent');
+  }
+
+  array_push($GLOBALS['tempFiles'], 'entities.ent');
+
+  if (PROCESSOR != 'xsltproc') {
+    exec(
+      sprintf(
+        'java com.elharo.xml.xinclude.SAXXIncluder %s >temp.xml',
+        $inputFile
+      )
+    );
+
+    array_push($GLOBALS['tempFiles'], 'temp.xml');
+
+    $inputFile = 'temp.xml';
+  }
+
+  if (PROCESSOR == 'xsltproc' &&
+      $format   == 'xml') {
+    exec(
+      sprintf(
+        'xmllint --noent --xinclude %s >%s',
+        $inputFile,
+        $outputFile
+      )
+    );
+  } else {
+    switch (PROCESSOR) {
+      case 'docbook-toys': {
+        exec(
+          sprintf(
+            'db2%s -o %s',
+
+            $format,
+            $inputFile
+          )
+        );
+
+        exec(
+          sprintf(
+            'mv temp.%s output/%s/print.%s',
+            $format,
+            $language,
+            $inputFile
+          )
+        );
+
+        array_push($GLOBALS['tempFiles'], 'CATALOG.local');
+        array_push($GLOBALS['tempFiles'], 'suse-html.dsl');
+        array_push($GLOBALS['tempFiles'], 'suse-print.dsl');
+      }
+      break;
+
+      case 'xsltproc': {
+        switch ($format) {
+          case 'pdf':
+          case 'rtf': {
+            $renderFormat = 'fo';
+          }
+          break;
+
+          default: {
+            $renderFormat = $format;
+          }
+        }
+
+        $stylesheetFile = prepareStylesheet(
+          $renderFormat,
+          $language
+        );
+
+        switch ($format) {
+          case 'fo':
+          case 'html':
+          case 'pdf':
+          case 'rtf':
+          case 'tex':
+          case 'text': {
+            if ($format == 'pdf') {
+              $tempOutputFile = str_replace('.pdf', '.fo', $outputFile);
+            }
+
+            else if ($format == 'text') {
+              $tempOutputFile = $outputFile . '.tmp.html';
+              array_push($GLOBALS['tempFiles'], $tempOutputFile);
+            }
+
+            if (!isset($built[$renderFormat][$language])) {
+              exec(
+                sprintf(
+                  'xsltproc --xinclude -o %s %s %s',
+
+                  isset($tempOutputFile) ? $tempOutputFile : $outputFile,
+                  $stylesheetFile,
+                  $inputFile
+                )
+              );
+
+              $built[$renderFormat][$language] = true;
+            }
+
+            if ($format == 'fo') {
+              $doHighlight = false;
+            }
+
+            else if ($format == 'pdf' ||
+                     $format == 'ps') {
+              exec(
+                sprintf(
+                  'fop -fo %s -%s %s',
+
+                  $tempOutputFile,
+                  $format,
+                  $outputFile
+                )
+              );
+
+              $doHighlight = false;
+            }
+
+            else if ($format == 'text') {
+              exec(
+                sprintf(
+                  'lynx -dump %s > %s',
+
+                  str_replace('\\', '/', $tempOutputFile),
+                  $outputFile
+                )
+              );
+
+              $doHighlight = false;
+            }
+
+            else if ($format == 'rtf') {
+              exec(
+                sprintf(
+                  'fo2rtf %s %s',
+
+                  $outputFile,
+                  str_replace('.fo', '.rtf', $outputFile)
+                )
+              );
+
+              $doHighlight = false;
+            }
+          }
+          break;
+
+          case 'html-chunked': {
+            if (!isset($built[$renderFormat][$language])) {
+              exec(
+                sprintf(
+                  'xsltproc --xinclude %s %s',
+
+                  $stylesheetFile,
+                  $inputFile
+                )
+              );
+
+              $built[$renderFormat][$language] = true;
+            }
+          }
+          break;
+        }
+
+        if ($doHighlight) {
+          if ($format == 'html') {
+            highlightFile($outputFile);
+          }
+
+          else if ($format == 'html-chunked') {
+            highlightDirectory($outputDirectory);
+          }
+        }
+      }
+      break;
+    }
+  }
+
+  while ($tempFile = array_pop($GLOBALS['tempFiles'])) {
+    @unlink($tempFile);
+  }
+
+  $end = getMicrotime();
+
+  if (extension_loaded('bcmath')) {
+    $time = bcsub($end, $start, 6);
+  } else {
+    $time = $end - $start;
+  }
+
+  printf(
+    "%01.2f seconds\n",
+
+    $time
+  );
+}
+
+function highlight($string) {
+  if (strpos($string[1], '?&gt;')    === false ||
+      strpos($string[1], '&lt;?xml') !== false) {
+    return '<pre class="programlisting"><code>' . $string[1] . '</code></pre>';
+  }
+
+  return str_replace(
+    array(
+      "\n",
+      '<br /><font color="#113d73">&lt;?php',
+      '?&gt;<br /></font><br /></font>'
+    ),
+    array(
+      '',
+      '<font color="#113d73">&lt;?php',
+      '?&gt;<br /></font></font>'
+    ),
+    sprintf(
+      '<pre class="programlisting">%s</pre>',
+      highlight_string(
+        str_replace(
+          array(
+            '&lt;',
+            '&gt;',
+            '&amp;',
+            '&quot;'
+          ),
+          array(
+            '<',
+            '>',
+            '&',
+            '"'
+          ),
+          $string[1]
+        ),
+        1
+      )
+    )
+  );
+}
+
+function highlightDirectory($directory) {
+  if ($dir = @opendir($directory)) {
+    while (false !== ($filename = @readdir($dir))) {
+      if (ereg('.html$', $filename) &&
+          $filename != 'phpOpenTracker.html') {
+        highlightFile($directory . DIRECTORY_SEPARATOR . $filename);
+      }
+    }
+
+    @closedir($dir);
+  }
+}
+
+function highlightFile($file) {
+  if ($buffer = @join('', @file($file))) {
+    $buffer = preg_replace_callback(
+      '!<pre class="programlisting">(.+)</pre>!Us',
+      'highlight',
+      $buffer
+    );
+
+    if ($fp = @fopen($file, 'w')) {
+      @fwrite($fp, $buffer);
+      @fclose($fp);
+    } else {
+      echo "Cannot write to $file.\n";
+      exit;
+    }
+  } else {
+    echo "Cannot open $file.\n";
+    exit;
+  }
+}
+
+function prepareFile($filename, $variables, $values) {
+  if ($file = @implode('', @file($filename . '.in'))) {
+    $file = str_replace($variables, $values, $file);
+
+    if ($fp = @fopen($filename, 'w')) {
+      @fwrite($fp, $file);
+      @fclose($fp);
+    } else {
+      echo "Cannot create $filename.\n";
+      exit;
+    }
+
+    array_push($GLOBALS['tempFiles'], $filename);
+  }
+}
+
+function prepareStylesheet($format, $language) {
+  switch ($format) {
+    case 'fo':
+    case 'rtf': {
+      $stylesheetFile = sprintf(
+        'stylesheets%sfo.xsl',
+        DIRECTORY_SEPARATOR
+      );
+    }
+    break;
+
+    case 'tex': {
+      $stylesheetFile = sprintf(
+        'stylesheets%stex.xsl',
+        DIRECTORY_SEPARATOR
+      );
+    }
+    break;
+
+    default: {
+      $stylesheetFile = sprintf(
+        'stylesheets%s%s.xsl',
+        DIRECTORY_SEPARATOR,
+        $format
+      );
+    }
+    break;
+  }
+
+  prepareFile(
+    sprintf(
+      'stylesheets%scommon.xsl',
+      DIRECTORY_SEPARATOR
+    ),
+    array(
+      '{language}',
+      '{db2latex_root}',
+      '{xsl_root}'
+    ),
+    array(
+      $language,
+      DB2LATEX_ROOT,
+      XSL_ROOT
+    )
+  );
+
+  prepareFile(
+    sprintf(
+      'stylesheets%snonhtml-common.xsl',
+      DIRECTORY_SEPARATOR
+    ),
+    array(
+      '{db2latex_root}',
+      '{xsl_root}'
+    ),
+    array(
+      DB2LATEX_ROOT,
+      XSL_ROOT
+    )
+  );
+
+  prepareFile(
+    $stylesheetFile,
+    array(
+      '{language}',
+      '{db2latex_root}',
+      '{xsl_root}'
+    ),
+    array(
+      $language,
+      DB2LATEX_ROOT,
+      XSL_ROOT
+    )
+  );
+
+  return $stylesheetFile;
+}
+
+function getMicrotime() {
+  $microtime = explode(' ', microtime());
+
+  return $microtime[1] . substr($microtime[0], 1);
+}
+?>

Modified: manual/trunk/build.conf-dist
===================================================================
--- manual/trunk/build.conf-dist	2004-10-18 09:25:04 UTC (rev 25)
+++ manual/trunk/build.conf-dist	2004-10-19 11:11:39 UTC (rev 26)
@@ -1,8 +1,9 @@
 <?php
-define('PROCESSOR', 'xsltproc');
+define('PROCESSOR',          'xsltproc');
 
-define('DTD_PATH',   'file:///d:/home/docbook/dtd/docbookx.dtd');
-define('XSL_ROOT',   'd:/home/docbook/xsl');
+define('DTD_PATH',           'file:///d:/home/docbook/dtd/docbookx.dtd');
+define('XSL_ROOT',           'd:/home/docbook/xsl');
+define('DB2LATEX_ROOT',      'd:/home/docbook/db2latex/xsl');
 
 ini_set('highlight.bg',      '#ffffff');
 ini_set('highlight.comment', '#ba8370');

Copied: manual/trunk/entities/online.ent (from rev 24, manual/trunk/entities.ent)
===================================================================
--- manual/trunk/entities.ent	2004-10-16 06:54:12 UTC (rev 24)
+++ manual/trunk/entities/online.ent	2004-10-19 11:11:39 UTC (rev 26)
@@ -0,0 +1,33 @@
+<!ENTITY AMAZON_DE_WISHLIST     '<ulink url="http://www.amazon.de/exec/obidos/registry/38W9FZC78HL2A/">Amazon.de Wunschzettel</ulink>'>
+<!ENTITY AMAZON_EN_WISHLIST     '<ulink url="http://www.amazon.de/exec/obidos/registry/38W9FZC78HL2A/">Amazon.de Wishlist</ulink>'>
+<!ENTITY CACHE_LITE             '<ulink url="http://pear.php.net/package/Cache_Lite">PEAR Cache_Lite</ulink>'>
+<!ENTITY GRAPHVIZ               '<ulink url="http://www.research.att.com/sw/tools/graphviz/">GraphViz</ulink>'>
+<!ENTITY IMAGE_GRAPHVIZ         '<ulink url="http://pear.php.net/package/Image_GraphViz">PEAR Image_GraphViz</ulink>'>
+<!ENTITY JPGRAPH                '<ulink url="http://www.aditus.nu/jpgraph/">JPGraph</ulink>'>
+<!ENTITY LICENSE                '<ulink url="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</ulink>'>
+<!ENTITY LIGHTTPD               '<ulink url="http://jan.kneschke.de/projects/lighttpd/">lighttpd</ulink>'>
+<!ENTITY MERGE_TABLES           '<xref linkend="tuning.mysql-merge-tables" endterm="mysql-merge-tables"/>'>
+<!ENTITY MSSQLSERVER            '<ulink url="http://www.microsoft.com/sql/">Microsoft SQL Server</ulink>'>
+<!ENTITY MYSQL                  '<ulink url="http://www.mysql.com/">MySQL</ulink>'>
+<!ENTITY MYSQL_4_1              '<ulink url="http://dev.mysql.com/doc/mysql/en/Nutshell_4.1_features.html">MySQL 4.1</ulink>'>
+<!ENTITY MYSQL_DELAY_KEY_WRITE  '<ulink url="http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html"><filename>DELAY_KEY_WRITE</filename></ulink>'>
+<!ENTITY MYSQL_INNODB           '<ulink url="http://dev.mysql.com/doc/mysql/en/InnoDB.html">InnoDB</ulink>'>
+<!ENTITY MYSQL_MYISAM           '<ulink url="http://dev.mysql.com/doc/mysql/en/MyISAM.html">MyISAM</ulink>'>
+<!ENTITY MYSQL_MYISAM_MERGE     '<ulink url="http://dev.mysql.com/doc/mysql/en/MERGE.html">MyISAM Merge</ulink>'>
+<!ENTITY MYSQL_MYISAMPACK       '<ulink url="http://dev.mysql.com/doc/mysql/en/myisampack.html"><filename>myisampack</filename></ulink>'>
+<!ENTITY MYSQL_PACK_KEYS        '<ulink url="http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html"><filename>PACK_KEYS</filename></ulink>'>
+<!ENTITY MYSQL_QUERY_CACHE      '<ulink url="http://dev.mysql.com/doc/mysql/en/Query_Cache.html">MySQL Query Cache</ulink>'>
+<!ENTITY MYSQL_SUBQUERIES       '<ulink url="http://dev.mysql.com/doc/mysql/en/Subqueries.html">Sub-Queries</ulink>'>
+<!ENTITY ORACLE                 '<ulink url="http://www.oracle.com/">Oracle</ulink>'>
+<!ENTITY OSS                    '<ulink url="http://www.opensource.org/docs/definition.php">Open Source Software</ulink>'>
+<!ENTITY P3P                    '<ulink url="http://www.w3.org/P3P/">Platform for Privacy Preferences (P3P) Project</ulink>'>
+<!ENTITY PEAR                   '<ulink url="http://pear.php.net/">PHP Extension and Add-On Repository (PEAR)</ulink>'>
+<!ENTITY POSTGRESQL             '<ulink url="http://www.postgresql.org/">PostgreSQL</ulink>'>
+<!ENTITY POT_API                '<xref linkend="api-reference" endterm="api"/>'>
+<!ENTITY SB                     '<ulink url="http://www.sebastian-bergmann.de/">Sebastian Bergmann</ulink>'>
+<!ENTITY THTTPD                 '<ulink url="http://www.acme.com/software/thttpd/">thttpd</ulink>'>
+<!ENTITY XML                    '<ulink url="http://www.w3.org/XML/">XML</ulink>'>
+<!ENTITY XML_TREE               '<ulink url="http://pear.php.net/package/XML_Tree">XML_Tree</ulink>'>
+
+<!ENTITY true                   '<constant>TRUE</constant>'>
+<!ENTITY false                  '<constant>FALSE</constant>'>

Copied: manual/trunk/entities/print.ent (from rev 24, manual/trunk/entities.ent)

Deleted: manual/trunk/entities.ent
===================================================================
--- manual/trunk/entities.ent	2004-10-18 09:25:04 UTC (rev 25)
+++ manual/trunk/entities.ent	2004-10-19 11:11:39 UTC (rev 26)
@@ -1,33 +0,0 @@
-<!ENTITY AMAZON_DE_WISHLIST     'Amazon.de Wunschzettel <footnote><para><ulink url="http://www.amazon.de/exec/obidos/registry/38W9FZC78HL2A/">http://www.amazon.de/exec/obidos/registry/38W9FZC78HL2A/</ulink></para></footnote>'>
-<!ENTITY AMAZON_EN_WISHLIST     'Amazon.de Wishlist <footnote><para><ulink url="http://www.amazon.de/exec/obidos/registry/38W9FZC78HL2A/">http://www.amazon.de/exec/obidos/registry/38W9FZC78HL2A/</ulink></para></footnote>'>
-<!ENTITY CACHE_LITE             'PEAR Cache_Lite <footnote><para><ulink url="http://pear.php.net/package/Cache_Lite">http://pear.php.net/package/Cache_Lite</ulink></para></footnote>'>
-<!ENTITY GRAPHVIZ               'GraphViz <footnote><para><ulink url="http://www.research.att.com/sw/tools/graphviz/">http://www.research.att.com/sw/tools/graphviz/</ulink></para></footnote>'>
-<!ENTITY IMAGE_GRAPHVIZ         'PEAR Image_GraphViz <footnote><para><ulink url="http://pear.php.net/package/Image_GraphViz">http://pear.php.net/package/Image_GraphViz</ulink></para></footnote>'>
-<!ENTITY JPGRAPH                'JPGraph <footnote><para><ulink url="http://www.aditus.nu/jpgraph/">http://www.aditus.nu/jpgraph/</ulink></para></footnote>'>
-<!ENTITY LICENSE                'Apache License, Version 2.0 <footnote><para><ulink url="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</ulink></para></footnote>'>
-<!ENTITY LIGHTTPD               'lighttpd <footnote><para><ulink url="http://jan.kneschke.de/projects/lighttpd/">http://jan.kneschke.de/projects/lighttpd/</ulink></para></footnote>'>
-<!ENTITY MERGE_TABLES           '<xref linkend="tuning.mysql-merge-tables" endterm="mysql-merge-tables"/>'>
-<!ENTITY MSSQLSERVER            'Microsoft SQL Server <footnote><para><ulink url="http://www.microsoft.com/sql/">http://www.microsoft.com/sql/</ulink></para></footnote>'>
-<!ENTITY MYSQL                  'MySQL <footnote><para><ulink url="http://www.mysql.com/">http://www.mysql.com/</ulink></para></footnote>'>
-<!ENTITY MYSQL_4_1              'MySQL 4.1 <footnote><para><ulink url="http://dev.mysql.com/doc/mysql/en/Nutshell_4.1_features.html">http://dev.mysql.com/doc/mysql/en/Nutshell_4.1_features.html</ulink></para></footnote>'>
-<!ENTITY MYSQL_DELAY_KEY_WRITE  '<filename>DELAY_KEY_WRITE</filename> <footnote><para><ulink url="http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html">http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html</ulink></para></footnote>'>
-<!ENTITY MYSQL_INNODB           'InnoDB <footnote><para><ulink url="http://dev.mysql.com/doc/mysql/en/InnoDB.html">http://dev.mysql.com/doc/mysql/en/InnoDB.html</ulink></para></footnote>'>
-<!ENTITY MYSQL_MYISAM           'MyISAM <footnote><para><ulink url="http://dev.mysql.com/doc/mysql/en/MyISAM.html">http://dev.mysql.com/doc/mysql/en/MyISAM.html</ulink></para></footnote>'>
-<!ENTITY MYSQL_MYISAM_MERGE     'MyISAM Merge <footnote><para><ulink url="http://dev.mysql.com/doc/mysql/en/MERGE.html">http://dev.mysql.com/doc/mysql/en/MERGE.html</ulink></para></footnote>'>
-<!ENTITY MYSQL_MYISAMPACK       '<filename>myisampack</filename> <footnote><para><ulink url="http://dev.mysql.com/doc/mysql/en/myisampack.html">http://dev.mysql.com/doc/mysql/en/myisampack.html</ulink></para></footnote>'>
-<!ENTITY MYSQL_PACK_KEYS        '<filename>PACK_KEYS</filename> <footnote><para><ulink url="http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html">http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html</ulink></para></footnote>'>
-<!ENTITY MYSQL_QUERY_CACHE      'MySQL Query Cache <footnote><para><ulink url="http://dev.mysql.com/doc/mysql/en/Query_Cache.html">http://dev.mysql.com/doc/mysql/en/Query_Cache.html</ulink></para></footnote>'>
-<!ENTITY MYSQL_SUBQUERIES       'Sub-Queries <footnote><para><ulink url="http://dev.mysql.com/doc/mysql/en/Subqueries.html">http://dev.mysql.com/doc/mysql/en/Subqueries.html</ulink></para></footnote>'>
-<!ENTITY ORACLE                 'Oracle <footnote><para><ulink url="http://www.oracle.com/">http://www.oracle.com/</ulink></para></footnote>'>
-<!ENTITY OSS                    'Open Source Software <footnote><para><ulink url="http://www.opensource.org/docs/definition.php">http://www.opensource.org/docs/definition.php</ulink></para></footnote>'>
-<!ENTITY P3P                    'Platform for Privacy Preferences (P3P) Project <footnote><para><ulink url="http://www.w3.org/P3P/">http://www.w3.org/P3P/</ulink></para></footnote>'>
-<!ENTITY PEAR                   'PHP Extension and Add-On Repository (PEAR) <footnote><para><ulink url="http://pear.php.net/">http://pear.php.net/</ulink></para></footnote>'>
-<!ENTITY POSTGRESQL             'PostgreSQL <footnote><para><ulink url="http://www.postgresql.org/">http://www.postgresql.org/</ulink></para></footnote>'>
-<!ENTITY POT_API                '<xref linkend="api-reference" endterm="api"/>'>
-<!ENTITY SB                     'Sebastian Bergmann <footnote><para><ulink url="http://www.sebastian-bergmann.de/">http://www.sebastian-bergmann.de/</ulink></para></footnote>'>
-<!ENTITY THTTPD                 'thttpd <footnote><para><ulink url="http://www.acme.com/software/thttpd/">http://www.acme.com/software/thttpd/</ulink></para></footnote>'>
-<!ENTITY XML                    'XML <footnote><para><ulink url="http://www.w3.org/XML/">http://www.w3.org/XML/</ulink></para></footnote>'>
-<!ENTITY XML_TREE               'XML_Tree <footnote><para><ulink url="http://pear.php.net/package/XML_Tree">http://pear.php.net/package/XML_Tree</ulink></para></footnote>'>
-
-<!ENTITY true                   '<constant>TRUE</constant>'>
-<!ENTITY false                  '<constant>FALSE</constant>'>