Re: [PHP-DEV] On fixing DOMNameSpaceNode and DOM NS API Inconsistency Problems

2019-06-27 Thread C. Scott Ananian
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,

Re: [PHP-DEV] On fixing DOMNameSpaceNode and DOM NS API Inconsistency Problems

2019-03-20 Thread C. Scott Ananian
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 sta

Re: [PHP-DEV] On fixing DOMNameSpaceNode and DOM NS API Inconsistency Problems

2019-03-17 Thread 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

Re: [PHP-DEV] On fixing DOMNameSpaceNode and DOM NS API Inconsistency Problems

2019-03-17 Thread Benjamin Eberlei
On Sun, Mar 17, 2019 at 2:52 PM 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

Re: [PHP-DEV] On fixing DOMNameSpaceNode and DOM NS API Inconsistency Problems

2019-03-17 Thread C. Scott Ananian
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 so

Re: [PHP-DEV] On fixing DOMNameSpaceNode and DOM NS API Inconsistency Problems

2019-03-17 Thread Benjamin Eberlei
On Wed, Mar 13, 2019 at 4:36 PM Rob Richards wrote: > There were specific reasons for it tho I can't recall all the details off > the top of my head. Part of it related to the underlying structures of > attributes and namespace nodes not being the same and cannot be user > interchangeable in the

Re: [PHP-DEV] On fixing DOMNameSpaceNode and DOM NS API Inconsistency Problems

2019-03-13 Thread Rob Richards
There were specific reasons for it tho I can't recall all the details off the top of my head. Part of it related to the underlying structures of attributes and namespace nodes not being the same and cannot be user interchangeable in the code, unless only inspected at the nodeptr level. Trying to ma

Re: [PHP-DEV] On fixing DOMNameSpaceNode and DOM NS API Inconsistency Problems

2019-03-12 Thread Pierre Joye
Hi, Only adding Rob just in case :) best, On Wed, Mar 13, 2019, 5:54 AM Benjamin Eberlei wrote: > Hi everyone, > > While looking for things to work on in php-src my friend Thomas pointed me > to a peculiar special case in ext/dom that leads to massive inconsistency > problems in the API. > > T

Re: [PHP-DEV] On fixing DOMNameSpaceNode and DOM NS API Inconsistency Problems

2019-03-12 Thread David Zuelke
I agree this should be fixed. It's pretty hilarious how this exact case (fiddling with the xmlns prefix) is the only comment for DOMElement::setAttributeNS: http://php.net/manual/en/domelement.setattributens.php (although unnecessary, as you don't have to "add namespaces" to a document, that automa

[PHP-DEV] On fixing DOMNameSpaceNode and DOM NS API Inconsistency Problems

2019-03-12 Thread Benjamin Eberlei
Hi everyone, While looking for things to work on in php-src my friend Thomas pointed me to a peculiar special case in ext/dom that leads to massive inconsistency problems in the API. There is an undocumented class DOMNameSpaceNode that gets returned from DOMElement::getAttributeNode(NS) if you se