How DokuWiki works: wiki markup is read by a parser which returns instructions. These instructions are processed by a renderer to produce some HTML code.
Just for reference, an instruction looks like that:
Array (  => internallink  => Array (  => java:spring:hello_world  => Hello World )  => 150 )
Instead of redoing the same process at each user request, DokuWiki has a powerful multi-level caching system. By using it, we can just get the cached instructions, and process them with a custom renderer to generate our own HTML code (with links to our PHP pages, not DokuWiki urls).
Download it here. File hierarchy
The index page contains several links to
doc.php, which directly uses data files from the
dokuwiki folder (a standard dokuwiki installation). DokuWikiRendererXHTML.php is a custom renderer (overrides some methods of DokuWiki's default HTML renderer).
// init renderer: