small improvement in doc gen tollchain
authorgggeek <giunta.gaetano@gmail.com>
Fri, 16 Dec 2022 18:47:29 +0000 (18:47 +0000)
committergggeek <giunta.gaetano@gmail.com>
Fri, 16 Dec 2022 18:47:29 +0000 (18:47 +0000)
doc/build/custom.xsl
pakefile.php

index c96cf55..a76d100 100644 (file)
@@ -15,7 +15,7 @@
 
 
 <!-- import base stylesheet -->
-<xsl:import href="../../../../vendor/docbook/docbook-xsl/xhtml/chunk.xsl"/>
+<xsl:import href="%docbook-chunk.xsl%"/>
 
 
 <!-- customization vars -->
@@ -88,4 +88,4 @@
 </xsl:template>
 
 
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>
index 5ca578b..9d2513b 100644 (file)
@@ -118,10 +118,15 @@ class Builder
             throw new \Exception("File $xssFile cannot be found");
         }
 
-        $docbookXslPath = realpath(Builder::buildDir().'/tools/vendor/docbook/docbook-xsl/fo/docbook.xsl');
+        $docbookFoXslPath = realpath(Builder::buildDir().'/tools/vendor/docbook/docbook-xsl/fo/docbook.xsl');
+        $docbookChunkXslPath = realpath(Builder::buildDir().'/tools/vendor/docbook/docbook-xsl/xhtml/chunk.xsl');
         file_put_contents(
             $xssFile,
-            str_replace('%docbook.xsl%', $docbookXslPath, file_get_contents($xssFile))
+            str_replace(
+                array('%fo-docbook.xsl%', '%docbook-chunk.xsl%'),
+                array($docbookFoXslPath, $docbookChunkXslPath),
+                file_get_contents($xssFile)
+            )
         );
 
         // Load the XML source
@@ -278,8 +283,7 @@ function run_doc($task=null, $args=array(), $cliOpts=array())
     $cmd = Builder::tool('php');
     pake_sh("$cmd " . Builder::toolsDir(). "/vendor/bin/phpdoc run --cache-folder ".Builder::buildDir()."/.phpdoc -d ".$srcDir.'/src'." -t ".$docDir.'/api --title PHP-XMLRPC --defaultpackagename PHPXMLRPC');
 
-    // from phpdoc comments using Sami
-    // deprecated on 2021/12, as Sami is abandonware
+    // from phpdoc comments using Sami - deprecated on 2021/12, as Sami is abandonware
     /*$samiConfig = <<<EOT
 <?php
     \$iterator = Symfony\Component\Finder\Finder::create()