Heiko Hees schreef: > Hi Roan, > >> you could use HTML as an intermediate stage, or I could add a >> parameter to action=parse that returns the DOM tree, so you can output >> PDF or whatever it is you want to output based on that. Let me know >> whether you want that feature. > > it would be great if api.php could return a real DOM tree. Can you > give us an preview how this would look like? > To get an idea of the DOM tree we are using to generate PDF, XML, etc. > you can take a look at this page: > http://www.mediawiki.org/wiki/Extension:XML_Bridge/Examples#Example_using_MWXML > > > Our parser tries to conserve the semantics available in the markup as > far as possible which is important if one wants to generate other > output formats. Well it turns out it wasn't as simple as I thought. The parser itself doesn't produce a DOM tree, the preprocessor does. Or rather, one version of the preprocessor (PreprocessorDOM). On systems that don't have the PHP DOM module, PreprocessorHash is used, which doesn't produce a DOM tree. Or at least that's my understanding of the situation. I'll investigate what kind of useful data I can get that works with both preprocessors.
Roan Kattouw (Catrope) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "mwlib" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mwlib?hl=en -~----------~----~----~----~------~----~------~--~---
