Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104780 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 3991 invoked from network); 18 Mar 2019 02:05:58 -0000 Received: from unknown (HELO a2i400.smtp2go.com) (103.47.205.144) by pb1.pair.com with SMTP; 18 Mar 2019 02:05:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpcorp.com; s=a1-4; h=Feedback-ID:X-Smtpcorp-Track:Date:Message-ID:From: To:Subject:Reply-To:Sender:List-Unsubscribe; bh=Zw4ZAbOX2Oopuqg8UlxPPkMqhbCG+1d8jdwb9rmBd0Q=; b=CPKcm6LG58siNIkzM7Vx26+E52 G3OOYLVBhliNeIUxq2pNhUJ1vqCLXKBbFtJt5E8nMYtmhiAWGc5gFPb4pNcEHqsMQhZx1BmnkRIxU dKlRUrZqKn6kf5mwRalQfbTTLfyeDqVVK19LjvXlM4xPYkA9yvCwFjFfYG1govpVWykcOjTD2+GYV eH1CAJg5jBH4Rws55qMPVgtxHzG2XMHSlKZszSOwkj/Gft84NDs9etY3jR8XYQJVxaoSu9nZNjVL7 XQ4+sohd34pSwBpVJXHQMXit8sYllJPd3GDbQRuM11qRZ5Dc00TDtMrYuiWGwWYHBcVFPeZImaqUG BaHqX9RA==; Received: from [10.103.47.204] (helo=SmtpCorp) by smtpcorp.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.91) (envelope-from ) id 1h5eiO-pH9Rlu-6d; Sun, 17 Mar 2019 22:57:12 +0000 Received: from [10.76.179.244] (helo=Robs-MacBook-Pro.local) by smtpcorp.com with esmtp (Exim 4.91) (envelope-from ) id 1h5eiN-U24bVN-KR; Sun, 17 Mar 2019 22:57:11 +0000 To: "C. Scott Ananian" , Benjamin Eberlei Cc: Pierre Joye , PHP internals References: <08e09ea4-20d0-277d-8919-4e3d4387699c@ctindustries.net> Openpgp: preference=signencrypt Autocrypt: addr=rrichards@ctindustries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Cuza+KiAoBQEYRp0YOonX4BpKoP8PhW16wz8XGLE4z CfDOzq7bHDzgwISetUaS8HhGWNS16uL+7rWd9Ntcj8Mb84/IegOYHIRHFts/zwiyuMmQki6W B12H0ITgkfCU/d4nxbLcZQARAQABiQI8BBgBCAAmFiEEwO1R4Lve98qHHkUlflDxS081CzcF Alo8IZ4CGwwFCQeGH4AACgkQflDxS081CzdwnA//cw/6jcrsk8bIr9R+QbBdlUXKwPQ/milj 7aoY8r5wG8oBlzJNPjChiaFPB878hsrPEMuwpARn0MLoxoEtA7cC6rXJq9Go71/xsTyikpSv nkZNljeWdC0av30eo7byE6kMPvCUiWq6MaY2GkV8vfvuYCEQLdIzqIv1P91R9qWGcV1vE4Gn JHdXYw6fvH7A8Hg5heq8EEhZSz4+mYuyygpCBhs9j/loERWULeCTI0E4PmjrcLFGxAD6ulte RUzZke+8/s4z6uPLyrX//On0G0ftwvZ6syU7xF7dARFgvTErZeiRoMle8D3EMMZsydSz7/v2 edhbGB1yZaIqV5012MZQFv8HoqideriJ7C/F+gsvPuyBb/7UNYSVO4qLH5n+x7QFXWaaCmYL 1AujbYbq7lz7avp2eL1QFRC6sTdouYlb9zMMF9ERCTW7G84xh2d6xHOD5SGFgGTDaeICKpr3 jmNVhifiZAXgAWfZjhS25rpalyPBPGBF5yJCGyuKZdpuz2ltt83HkHyby3xuzbnyjNHMwsrk 1i3jRmJQ9pa8S9F/+502pNXwFbWKUScOwrwpCsetnsfQyDsGS6DmWBM7Zt8hBW/ALas9a85T 4rKiYBlqnYbLVDgf8CeoXWA3cNjf5lstMfMWzCSzG16v5emcXGFsR1owvo16p5DlCl2eKpYL Cvk= Message-ID: <7e338777-d258-f795-e658-b290dd6ce98b@ctindustries.net> Date: Sun, 17 Mar 2019 18:57:10 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Smtpcorp-Track: 1h5-iNl24PVNKR.MhDGxV-mG Feedback-ID: 2192m:2192ahkZ5OI:2192sitGAit-g7 X-Report-Abuse: Please forward a copy of this message, including all headers, to Subject: Re: [PHP-DEV] On fixing DOMNameSpaceNode and DOM NS API Inconsistency Problems From: rrichards@ctindustries.net (Rob Richards) On 3/17/19 6:52 AM, C. Scott Ananian wrote: > On Sun, Mar 17, 2019, 9:34 AM Benjamin Eberlei wrote: > >> It is still a draft but Thomas and I have started working on an RFC and >> code to update ext/dom to cover the latest standard release: >> https://wiki.php.net/rfc/dom_living_standard_api - we plan on proposing >> that soon, maybe you have some feedback. >> > Updating the DOM extension would be something the Wikimedia Foundation > would very much like to see happen. It's more complicated than just adding > some new methods, though: there are significantly spec-compliance issues > with the current code and performance problems too. We've been porting > code from JS to PHP which (in the JS version) used a good spec-compliance > DOM implementation, and have been keeping a list of all the crazy bugs and > workarounds that have been necessary. > > Start from the basic fact that the modern DOM requires Node#nodeName to be > uppercase for HTML elements, and the current code uses all lowercase. It's > hard to see how that could be addressed without breaking backward compat. > > Here are our notes/discussions/etc: > https://phabricator.wikimedia.org/T215000 > https://mediawiki.org/wiki/Parsoid/PHP/Help_wanted > (and there's more where that came from) > --scott > > PS. My personal feeling at this time is that it would be better to put the > core libxml abstractions in an extension, to allow fast xpath and perhaps > parse/serialize, but that the actual DOM should be built as a php library > on top of that, in order to allow rapid changes (the WHATWG is pretty > actively making additions/changes to the we spec these days) which are > decoupled from the PHP release cycle. > I'll take a look through the lists you have but you need to remember that the DOM specs were not written for HTML. While HTML might have some more restrictive requirements that piggy back on the DOM specs themselves, they are not the standard for DOM. The output HTML functionality was more convenience methods than part of the core extension, Rob