File tree Expand file tree Collapse file tree 4 files changed +14
-13
lines changed Expand file tree Collapse file tree 4 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -1474,8 +1474,9 @@ static void dom_libxml_reconcile_ensure_namespaces_are_declared(xmlNodePtr nodep
1474
1474
/* Put on stack to avoid allocation.
1475
1475
* Although libxml2 currently does not use this for the reconciliation, it still
1476
1476
* makes sense to do this just in case libxml2's internal change in the future. */
1477
- xmlDOMWrapCtxt dummy_ctxt = {0 };
1478
- xmlDOMWrapReconcileNamespaces (& dummy_ctxt , nodep , /* options */ 0 );
1477
+ //xmlDOMWrapCtxt dummy_ctxt = {0};
1478
+ //xmlDOMWrapReconcileNamespaces(&dummy_ctxt, nodep, /* options */ 0);
1479
+ xmlReconciliateNs (nodep -> doc , nodep );
1479
1480
}
1480
1481
1481
1482
void dom_reconcile_ns (xmlDocPtr doc , xmlNodePtr nodep ) /* {{{ */
Original file line number Diff line number Diff line change @@ -118,18 +118,18 @@ test_appendChild_with_shadowing();
118
118
--EXPECT--
119
119
-- Test document fragment with import --
120
120
<? xml version="1.0 "?>
121
- <html xmlns="https://php.net/something" xmlns:ns="https://php.net/whatever"><element ns:foo="https://php.net/bar"/></html>
121
+ <html xmlns="https://php.net/something" xmlns:ns="https://php.net/whatever"><default: element xmlns:default="https://php.net/something" ns:foo="https://php.net/bar"/></html>
122
122
-- Test document fragment without import --
123
123
<? xml version="1.0 "?>
124
- <html xmlns=""><element xmlns:foo="https://php.net/bar"><foo:bar/><bar xmlns="" /></element></html>
124
+ <html xmlns=""><element xmlns:foo="https://php.net/bar"><foo:bar/><bar/></element></html>
125
125
string(7) "foo:bar"
126
126
string(19) "https://php.net/bar"
127
127
-- Test document import --
128
128
<? xml version="1.0 "?>
129
- <feed xmlns="http://www.w3.org/2005/Atom">
130
- <div xmlns="http://www.w3.org/1999/xhtml">
131
- <p>Test-Text</p>
132
- </div>
129
+ <feed xmlns="http://www.w3.org/2005/Atom" xmlns:default="http://www.w3.org/1999/xhtml" >
130
+ <default: div xmlns="http://www.w3.org/1999/xhtml">
131
+ <default: p>Test-Text</default: p>
132
+ </default: div>
133
133
</feed>
134
134
-- Test partial document import --
135
135
<? xml version="1.0 "?>
Original file line number Diff line number Diff line change @@ -22,6 +22,6 @@ echo $aDOM->saveXML();
22
22
?>
23
23
--EXPECT--
24
24
<? xml version="1.0 "?>
25
- <ns: inner xmlns="http://php.net" xmlns:ns="http://php.net">
26
- <ns: WATCH-MY-NAMESPACE xmlns=""/>
27
- </ns: inner>
25
+ <inner xmlns="http://php.net" xmlns:ns="http://php.net">
26
+ <WATCH-MY-NAMESPACE xmlns=""/>
27
+ </inner>
Original file line number Diff line number Diff line change @@ -24,6 +24,6 @@ echo $bDOM->saveXML(), "\n";
24
24
?>
25
25
--EXPECT--
26
26
<? xml version="1.0 "?>
27
- <B xmlns="http://example.com/A">
28
- <C xmlns="http://example.com/C" xmlns:default="http://example.com/Z"/>
27
+ <B xmlns="http://example.com/A" xmlns:default="http://example.com/C" >
28
+ <default: C xmlns="http://example.com/C" xmlns:default="http://example.com/Z"/>
29
29
</B>
You can’t perform that action at this time.
0 commit comments