mirror of https://github.com/bjc/prosody
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
259 B
13 lines
259 B
|
10 years ago
|
function parse(parse)
|
||
|
|
local x =
|
||
|
|
[[<x xmlns:a="b">
|
||
|
|
<y xmlns:a="c"> <!-- this overwrites 'a' -->
|
||
|
|
<a:z/>
|
||
|
|
</y>
|
||
|
|
<a:z/> <!-- prefix 'a' is nil here, but should be 'b' -->
|
||
|
|
</x>
|
||
|
|
]]
|
||
|
|
local stanza = parse(x);
|
||
|
|
assert_equal(stanza.tags[2].attr.xmlns, "b");
|
||
|
|
end
|