User "Brion VIBBER" posted a comment on MediaWiki.r99909. Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/99909#c25239 Commit summary:
Followup r80375: let PreprocessorTest work on Preprocessor_Hash etc as well as Preprocessor_Dom Using same technique as ApiExpandTemplates to serialize the object tree back to XML, rather than asking for the DOM implementation's internal XML return function. Have to also perform normalization on the test cases, as they aren't normalized to what libxml2 serializes. :P Note that there are 4 test failures currently with Preprocessor_Hash, as it makes a separate <equals> element around = which doesn't appear to be in Preprocessor_Dom's output. Comment: In theory it ought to work with Preprocessor_Native if the object has a _toString() method that returns XML. Having a standard preprocessToXml() method wouldn't be wrong at all -- it might be awesome! -- but it doesn't actually exist on the Preprocessor interface. There just happened to be one on Preprocessor_DOM which seems to have been mostly an internal method. Generally, having a clean standard way to take "the object tree I got from the preprocessor" and say "now serialize it as XML" is what I'd want, rather than having to start from source every time. _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
