Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104775 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 88068 invoked from network); 17 Mar 2019 17:01:31 -0000 Received: from unknown (HELO mail-oi1-f171.google.com) (209.85.167.171) by pb1.pair.com with SMTP; 17 Mar 2019 17:01:31 -0000 Received: by mail-oi1-f171.google.com with SMTP id t206so10958301oib.3 for ; Sun, 17 Mar 2019 06:52:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wikimedia.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RjZ+FG3jjUirRPoPRcOBH2DrbSV8jHN11Ro/EjnAWPs=; b=A2KAjUgcv1QKTEvwnaNHTiw5kZlWgktmaS+bLkBAcqXF4SEkM48UBcp2FOPFMHSN7D azOrRcn6RoaVagt0AHNZNi5ynJdmfi9VAa7eEib1ds2gRvE3A8D6M3yeNG3/T74gjC2S viRVLRMbBhwWhdor+Uibr8lk/5KTTqviQIa5U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RjZ+FG3jjUirRPoPRcOBH2DrbSV8jHN11Ro/EjnAWPs=; b=D0pMSEvHS9fvnzblToHHy6ufg46g4nS75lYzInFbnlW+RQny1kaVNaB61rEaCwBgr7 1d6VHU2XJGjkD+w5wZK9SPUUTPSwD4mKW2AGyNTetTn0a2gHPChzb3dwWkgp+Ok5X28U xzKwgkS0duXLA8DLGCl2LfOd7zs7bzNVYPWXtxZ4hWYFGtnfNfx8SuQxjdgQQk8/3j05 m4BwiKsPVDVTYHSWNSx2KLK1SjW5ufRd/GwucE+jSfBTTpc65CWv4OfEDZS1LR/PRLmi 2TDAb5R8AOWrUfpsaul9Qf/Y+ZFYpIZHzvkPrSo8RxT3NclmKtWRsmDNt+hFKfja4W44 qexw== X-Gm-Message-State: APjAAAVeacyWVAkCC3oqKsRVM+2xuUvmBsQW6GqUtvDBuSXrlsYar1wY +63l8+fmixbYuRl1FyU9sfSIu3LoNxKMMfD/CSz1+g== X-Google-Smtp-Source: APXvYqwdgzZsyMhOofnB3Tlo16ZnJ9/ua8o77KhZ/B4SdCH7BW3B89sD4JgxpE+c32jRP6n9yh96m+SvgbcMfN2BzXA= X-Received: by 2002:aca:bf41:: with SMTP id p62mr7294457oif.8.1552830759688; Sun, 17 Mar 2019 06:52:39 -0700 (PDT) MIME-Version: 1.0 References: <08e09ea4-20d0-277d-8919-4e3d4387699c@ctindustries.net> In-Reply-To: Date: Sun, 17 Mar 2019 09:52:29 -0400 Message-ID: To: Benjamin Eberlei Cc: Rob Richards , Pierre Joye , PHP internals Content-Type: multipart/alternative; boundary="000000000000d3e0f305844a9503" Subject: Re: [PHP-DEV] On fixing DOMNameSpaceNode and DOM NS API Inconsistency Problems From: cananian@wikimedia.org ("C. Scott Ananian") --000000000000d3e0f305844a9503 Content-Type: text/plain; charset="UTF-8" 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. --000000000000d3e0f305844a9503--