Currently, if you recursively call getDocNamespaces on any SimpleXML node
it retrieves ALL the namespaces for the entire document, regardless of what
node you call it on. This patch adds a second bool argument called
from_root
that allows you to specify if you want all the namespaces from
the root (default for BC) or only the namespaces from and below the node
you call it on.
I submitted this patch a while ago and haven't heard anything. I was
recently contacted by someone asking if this feature was released b/c they
needed this functionality. I've updated the patch against PHP-5.4 on github
(https://github.com/php/php-src/pull/112).
Is there some procedure I am missing for getting this committed? Is there
some place I should be going for this discussion? I couldn't find an IRC
channel that was helpful w/ core php development.
Thank you,
--
Lonny Kapelushnik
http://lonnylot.com
(732) 807-5509
Can someone please let me know if I'm doing something wrong in trying to
get this committed?
Am I doing something procedurally wrong or is it normal for nobody to
respond?
Thank you
On Thu, Jun 28, 2012 at 11:39 AM, Lonny Kapelushnik lonnyk@gmail.comwrote:
Currently, if you recursively call getDocNamespaces on any SimpleXML node
it retrieves ALL the namespaces for the entire document, regardless of what
node you call it on. This patch adds a second bool argument called
from_root
that allows you to specify if you want all the namespaces from
the root (default for BC) or only the namespaces from and below the node
you call it on.I submitted this patch a while ago and haven't heard anything. I was
recently contacted by someone asking if this feature was released b/c they
needed this functionality. I've updated the patch against PHP-5.4 on github
(https://github.com/php/php-src/pull/112).Is there some procedure I am missing for getting this committed? Is there
some place I should be going for this discussion? I couldn't find an IRC
channel that was helpful w/ core php development.Thank you,
--
Lonny Kapelushnik
http://lonnylot.com
(732) 807-5509
--
Lonny Kapelushnik
http://lonnylot.com
(732) 807-5509
Hi!
Can someone please let me know if I'm doing something wrong in trying to
get this committed?Am I doing something procedurally wrong or is it normal for nobody to
respond?
Usually it helps to talk to extension maintainer (list of them in in
EXTENSIONS file).
Speaking of the patch, could you explain what is it returning when
recursive is set but from_root is false?
Besides that, it looks OK but also needs NEWS and UPGRADING
descriptions. Please add those and I think it can be merged.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227
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