When exporting xhtml body of a dokuwiki page, dokuwiki formatting takes over if the page doesn't exist yet.
Example(php):
$base_url = "http://.../dokuwiki/doku.php?id=1234";
$addendum = "&do=export_xhtmlbody";
$complete_url = $base_url.$addendum;
$exported_page = file_get_contents($complete_url);
echo $exported_page;
in case of id=1234 existing already, it outputs proper page info and renders within the page it's echoed on.
in case of id=1234 not yet created, dokuwiki takes over.
Can I check if page is created or simply output newpage.txt in case 2?