I am trying to get pagelist directives working with the PublishPDF library and would like some advice. The problem is the call to MarkupToHTML in the FPLTemplate function of scripts/pagelist.php (running pmwiki version 2.1.27).
To get things to work, I had to make the following change to function FPLTemplate: global $FPLMarkupFunction; ... SDV($FPLMarkupFunction, 'MarkupToHTML'); return ... $FPLMarkupFunction($pagename, $out, ... When producing a pdf I define a replacement $FPLMarkupFunction which calls MarkupToHTML then patches the result. Using the PmWiki.FAQ page as a test, this fixes the problem. I have to remind pmwiki that it is producing wikibook xml and not html; otherwise the result returned from the FPLTemplate function gets all the <...> tags stripped, leaving raw text. To prevent this, after FPLTemplate calls MarkupToHTML, the patch restores a namespace qualifier to the tags, to tell the "outer" pmwiki MarkupToHTML call that the result contains wikibook xml tags. The namespace qualifier allows us to distinguish between wikibook xml and any residual html tags we may have overlooked. Any residual html tags get stripped before we pass the content to the pdf processor, as a pmwiki posteval step. So an alternative solution would be to have a way to tell the "inner" MarkupToHTML call not to do this step, but I can't see any obvious way to do this. 1. Is the above patch the best solution and if so, could it be added to the core pmwiki please? 2. Is there perhaps a better solution I haven't thought of? 3. Are there any bad side effects of which I may be unaware? 4. To restore pmwiki's "markup agnostic" status, should the <div> tags wrapped around the FPLTemplate result also be replaced by a customisable variable? 5. Is this problem present in the pmwiki 2.2 series? Any advice would be welcome. -- JR -- John Rankin \_ \) \,\__/7 / / ( c' \ / /, /_/ | & * Wellington ) / / /, / ( | / \__/ V _______________________________________________ pmwiki-devel mailing list pmwiki-devel@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-devel