Re: Re: [PATCH] Feature 55218 - SimpleXML namespaces
Hi Stas,
Thanks for the response!
Usually it helps to talk to extension maintainer (list of them in in
> EXTENSIONS file).
>
In the original message of this thread I CCed the extension maintainer
listed in EXTENSIONS (per the instructions in the README.SUBMITTING_PATCH)
and I did not hear anything back. Previously, when I originally wrote this
feature, I sent a private e-mail to the 3 maintainers listed on top of the
simplexml.c file and did not hear anything back either (this was on
2011-08-31).
> Speaking of the patch, could you explain what is it returning when
> recursive is set but from_root is false?
>
It will only return the namespaces below and including the node you call it
on.
Say you have an XML doc like https://gist.github.com/3066372
Currently, if you call $x->getDocNamespaces(true) and
$x->person[0]->getDocNamespaces(true) you get the same results. This is
because the recursive call *always* starts from the root of the document.
With the patch, when from_root is false the recursion will start from the
node you call getDocNamespaces on. So when
calling $x->getDocNamespaces(true, false) and
$x->person[0]->getDocNamespaces(true, false) they return results based on
the node they were called on.
> Besides that, it looks OK but also needs NEWS and UPGRADING
> descriptions. Please add those and I think it can be merged.
These are now added.
Thank you for your help! Please let me know if anything else needs to be
changed.
Have a great day!
--
Lonny Kapelushnik
http://lonnylot.com
(732) 807-5509
Thread (4 messages)