Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106083 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 14266 invoked from network); 28 Jun 2019 00:03:43 -0000 Received: from unknown (HELO mail-ot1-f48.google.com) (209.85.210.48) by pb1.pair.com with SMTP; 28 Jun 2019 00:03:43 -0000 Received: by mail-ot1-f48.google.com with SMTP id x21so3777316otq.12 for ; Thu, 27 Jun 2019 14:20:27 -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=sZeAVTt2oq98wqYZd9qnN0ISTLNY/p9iYmLWN2vn5WY=; b=mVau6YUix2kUszhKvFih/Djy0A1hf/lk2EDKkZjRBEEteSFJcbXljmnuYwbluP0cPc 0pH4riamkw1F3qoujTSKm+02qzZ6tX/miZVI8v9Moll9cy+4DefZmKsue7aqmEjJRNjH UeBXI8ZqOeVCIqkttSWLEyCvQNTHKBUMhZpfU= 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=sZeAVTt2oq98wqYZd9qnN0ISTLNY/p9iYmLWN2vn5WY=; b=gAZ3Wp0TWcB03Rw6qvz0BMjbulXbj1K8yj9g1nCgxaVuCm0NWD96m3lidgsqn2zO2m B3oq1z7F3Kd8Ha0/+24WUg7kIZr4BAPQ2Sj7dDEcNCnVcY78u0WzFlwyIKFPylu/jPho bSrJeKdt2oHpJ8gI961kqF2qVoqjdccIbIhkyUTdkieSUzWPWVsp3b81gM+qyrhF8UVB Bx3HCbxRTk5+rKYpobSrOUSzzeU6lqtVsjGooex+FL3rKHKWW4pCITGCV+dYurJeFv3z yC+CJ0iTMlXOhl+Iycr73VNAY5i7R75KTKJ1Svgzs3/yZ9yaI22aGfOTfTTJ8CHNBGTJ KyKw== X-Gm-Message-State: APjAAAV76tvVhGfwd7+E2BLodvLVkUJpDTihMD+Vz9dDfYuI5Yn3KGdl 18kvZfvyxdqj6ZwxVZ38w1xSSM56Yk3IqhLnlaunXA== X-Google-Smtp-Source: APXvYqwPsbHcc11Sk1QDZ8DciSKqyY6526PqClYsD3PxVDPMYB05u7xIpoMaRQf4W4jTMqzP9MWMkf8UcCDBGIwALjg= X-Received: by 2002:a9d:7ccb:: with SMTP id r11mr4854532otn.80.1561670426858; Thu, 27 Jun 2019 14:20:26 -0700 (PDT) MIME-Version: 1.0 References: <08e09ea4-20d0-277d-8919-4e3d4387699c@ctindustries.net> <7e338777-d258-f795-e658-b290dd6ce98b@ctindustries.net> In-Reply-To: Date: Thu, 27 Jun 2019 17:20:15 -0400 Message-ID: To: Rob Richards Cc: Benjamin Eberlei , Pierre Joye , PHP internals Content-Type: multipart/alternative; boundary="0000000000000cadd6058c54bbc9" Subject: Re: [PHP-DEV] On fixing DOMNameSpaceNode and DOM NS API Inconsistency Problems From: cananian@wikimedia.org ("C. Scott Ananian") --0000000000000cadd6058c54bbc9 Content-Type: text/plain; charset="UTF-8" Brief update: We found a few more PHP DOM compatibility bugs, including one with DOMNode::normalize(): https://bugs.php.net/bug.php?id=78221 In addition, one of our engineers implemented a pure-PHP DOM implementation: https://github.com/linehan/DOMOperator We're not using that in production yet, but it's probably quicker than trying to make PHP's DOM implementation spec-compliant. --scott On Wed, Mar 20, 2019 at 11:48 AM C. Scott Ananian wrote: > On Sun, Mar 17, 2019 at 6:57 PM Rob Richards > wrote: > >> 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, >> > > Just dealing with the latest WHATWG DOM specs (not the html-specific part) > would still involve grappling with `getAttribute` behavior, the case of > nodeName (search for "HTML-uppercased qualified name" in the DOM spec), the > numeric node type of the root document, performance of methods on > namespaced nodes, etc. It would certainly be a useful step forward, even > if it weren't a full HTML DOM. > > What would be even better is if the hooks were present to allow > subclassing the core DOM types so that you could implement HTMLElement in > pure PHP as a subclass of DOMElement, etc. For example, right now it is > impossible to create a new DOMNodeList from PHP, which makes pure PHP > implementations of the missing HTML DOM methods (like querySelectorAll) > impossible (for example wikimedia/zest-css has to return an array instead > of a DOMNodeList). > --scott > > -- (http://cscott.net) --0000000000000cadd6058c54bbc9--