Fix bug #54382 (getAttributeNodeNS doesn't get xmlns* attributes)#2337
Closed
aboks wants to merge 2 commits intophp:PHP-7.0from
Closed
Fix bug #54382 (getAttributeNodeNS doesn't get xmlns* attributes)#2337aboks wants to merge 2 commits intophp:PHP-7.0from
aboks wants to merge 2 commits intophp:PHP-7.0from
Conversation
The fix is based on the same strategy for handling namespace declarations as used by getAttributeNode. Note that this strategy makes these methods not return a DOMAttr for xmlns* attributes, but an instance of the (undocumented) class DOMNameSpaceNode. This is not really ideal, but at least this fix makes the behavior of getAttributeNode and getAttributeNodeNS consistent. A follow-up action would be to investigate whether DOMNameSpaceNode can be made into a subclass of DOMAttr (which may be hard due to the way libxml treats namespace declarations) or document this deviating return value for xmlns* attributes.
Member
|
Merged 721a189 Thanks. Please do a documentation patch on edit.php.net and ping me on this thread when done (with your username on edit). |
php-pulls
pushed a commit
that referenced
this pull request
Jan 26, 2017
php-pulls
pushed a commit
that referenced
this pull request
Jan 26, 2017
* PHP-7.0: [ci skip] news entry for PR #2337
php-pulls
pushed a commit
that referenced
this pull request
Jan 26, 2017
* PHP-7.1: [ci skip] news entry for PR #2337
Contributor
Author
|
@krakjoe I made a patch on edit.php.net for documenting this deviating return value. I've logged in on edit using my GitHub account (and got userID 77704). |
Member
|
Merged, thanks ;) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fix is based on the same strategy for handling namespace
declarations as used by getAttributeNode. Note that this strategy makes
these methods not return a DOMAttr for xmlns* attributes, but an
instance of the (undocumented) class DOMNameSpaceNode. This is not
really ideal, but at least this fix makes the behavior of
getAttributeNode and getAttributeNodeNS consistent.
A follow-up action would be to investigate whether DOMNameSpaceNode can
be made into a subclass of DOMAttr (which may be hard due to the way
libxml treats namespace declarations) or document this deviating return
value for xmlns* attributes.