Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:104833 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 92413 invoked from network); 20 Mar 2019 18:56:26 -0000 Received: from unknown (HELO mail-oi1-f175.google.com) (209.85.167.175) by pb1.pair.com with SMTP; 20 Mar 2019 18:56:26 -0000 Received: by mail-oi1-f175.google.com with SMTP id u12so2194073oiv.1 for ; Wed, 20 Mar 2019 08:48:21 -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=1O8VSqVXpqNybLj2lXy2IUGvVfpUclKuqhA5IUF/dps=; b=a6xHvIhgEyv6SKsdcrHYPh/MDz+j/YoAYgw7h5etOeYkOJYBVeTjRUq3xRuWJBERpV kun9/3ybHIi+jW42S7k4Pkijwp48jtZ9w03gdp2mPQwrzmCisT8/rAg+3COMQdHVAlhz diI0abT18jmxg2ISzBhEupcAVUR94AE+xL2zk= 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=1O8VSqVXpqNybLj2lXy2IUGvVfpUclKuqhA5IUF/dps=; b=lm1D5Ns1dnqyyiqLLRvA6VcdNKLt2qkIaSK3Qn8ag8JPpn0KwpZkY+oJpUo9r5DaSh iDXdlq/q5/Vnc7cNMGXqvIsLc3Q5dbLJRPQuROhKzy9fg/pIOry0+FkYRwDtw/WLPKnV vYMM9jlURc7uuzqbL1mZ5PWjssJewsFI6lijRbG7Q6m7PMWHCXuPp35QXugcUTjYs9sH /U8EM6MesToVP75dcE5yvsQ2ifZUTBhe6ZPjxdxNIRfhpMdnUs6aenLocHKCHYX5JZ/7 Gvj2SUGqLe46CBlpBoLWCsbs3FyQ3d1fzr1apwkQbWWqNT7ya8TO402tdeaBTqyRXDNU fsVw== X-Gm-Message-State: APjAAAWfdUlaR8XNs0jPZV/mdlZ37HNf0L3QTgbHzObFmsQsKIT5tQJq yoE1XwPF1/iI3YzkvV1p2HjT6neFeBx0qnNWV8QXZw== X-Google-Smtp-Source: APXvYqw3xY9Q723SsVAiFUSep82Y5mFSxs1CY5EDNMjtCoxKVl8eW/62MBX+1uLCQ3OypV3MihAUgbn0PtQpF+fcwIU= X-Received: by 2002:aca:5b44:: with SMTP id p65mr5571673oib.159.1553096901240; Wed, 20 Mar 2019 08:48:21 -0700 (PDT) MIME-Version: 1.0 References: <08e09ea4-20d0-277d-8919-4e3d4387699c@ctindustries.net> <7e338777-d258-f795-e658-b290dd6ce98b@ctindustries.net> In-Reply-To: <7e338777-d258-f795-e658-b290dd6ce98b@ctindustries.net> Date: Wed, 20 Mar 2019 11:48:10 -0400 Message-ID: To: Rob Richards Cc: Benjamin Eberlei , Pierre Joye , PHP internals Content-Type: multipart/alternative; boundary="00000000000019c1990584888ddb" Subject: Re: [PHP-DEV] On fixing DOMNameSpaceNode and DOM NS API Inconsistency Problems From: cananian@wikimedia.org ("C. Scott Ananian") --00000000000019c1990584888ddb Content-Type: text/plain; charset="UTF-8" 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 --00000000000019c1990584888ddb--