phpQuery itself builds on the DOM module already in PHP, so be aware that
using it for this purpose is equivalent to using DOM & Xpath functions
already available.
For one thing this means that HTML will have to be run through the libxml2
HTML parser (which I have found is very sketchy with perfectly legal implied
close tags and such). In addition to memory and performance concerns of
parsing the whole document into a DOM tree and reserializing it, you might
not get back the structure you put in... hopefully no surprises but keep an
eye out.
-- brion
On Jan 3, 2011 1:49 AM, "Philip Tzou" <philip.npc(a)gmail.com> wrote:
According to its website, "phpQuery is a server-side, chainable, CSS3
selector driven Document Object Model (DOM) API based on jQuery JavaScript
Library."
I feel it will be very convenient if we introduce such jquery-like tools
into MediaWiki since we do have the need to parse HTML text. For example,
I
can replace the awful regex part of
LanguageConverter::autoConvert with
phpQuery.
So I want to ask is it possible to introduce phpQuery into MediaWiki?
sincerely,
Philip Tzou
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l