Hi again :)

Here I am again trying to have livedocs running with peardoc and phpdoc for the build process. I have a little problem choosing the best way to split this stuff : It was first designed for phpdoc. That means that most of functions are only sweeted for phpdoc, example :

function search_parse_dir(***) {
...
case 'reference' :
if ($f == 'configure.xml' || $f == 'constants.xml' || $f == 'ini.xml' || $f == 'reference.xml') {
$docbook_id = 'ref.' . basename($path);
} else {
$docbook_id = 'function.' . substr($f, 0, -4);
}
break;


...
}


I already created some doc specific configuration files, containing something like this :


[EMAIL PROTECTED]:/home/didou/cvs/livedocs$ cat mk_phpdoc.php
<?php

define('MK_VERSION', true);
$parse_dirs = array('faq', 'reference', 'security', 'chapters', 'appendices');



but this won't do the trick. So my question is, should I have customized search_parse_file() and search_parse_dir() functions in my config files ? or should the whole mkindex.php script be rewritten to be more generic (but still I can't see how the switch mentionned above will be customised..)


So, let's see what we have :

1 - function entity_replace() :
  good for both docs

2 - class DocBookXMLFileParser :
good for both docs, but I need to rewrite end_elem() to handle this code :
if ($this->last_id == 'wrappers') {
echo "\n\n";
}
in a more generic way (BTW, why do we need this ?)


3 - build_func_list() :
  only for phpdoc, I introduced MK_VERSION to skip this for other docs

4 - parse_file() :
  good for both docs

5 - scan_entities() :
need to be rewritten to take another arguement containing the entities files location.


6 - scan_dir() :
  need to be rewritten to take a $skip argument

7 - search_parse_file() and search_parse_dir() :
  see above.


Comments ?


didou

PS : I also started hacking the XML -> HTML rendering part

Reply via email to