Comparison

core/xmlhandlers.lua @ 1414:6f653b8beac9

xmlhandlers: Remove numeric attributes
author Waqas Hussain <waqas20@gmail.com>
date Thu, 25 Jun 2009 10:04:22 +0500
parent 1155:a93b25f1528e
child 1523:841d61be198f
comparison
equal deleted inserted replaced
1413:b7e17efe433e 1414:6f653b8beac9
58 if curr_ns ~= stream_default_ns then 58 if curr_ns ~= stream_default_ns then
59 attr.xmlns = curr_ns; 59 attr.xmlns = curr_ns;
60 end 60 end
61 61
62 -- FIXME !!!!! 62 -- FIXME !!!!!
63 for i, k in ipairs(attr) do 63 for i=1,#attr do
64 local k = attr[i];
65 attr[i] = nil;
64 local ns, nm = k:match("^([^|]+)|?([^|]-)$") 66 local ns, nm = k:match("^([^|]+)|?([^|]-)$")
65 if ns and nm then 67 if ns and nm then
66 ns = ns_prefixes[ns]; 68 ns = ns_prefixes[ns];
67 if ns then 69 if ns then
68 attr[ns..":"..nm] = attr[k]; 70 attr[ns..":"..nm] = attr[k];
69 attr[i] = ns..":"..nm;
70 attr[k] = nil; 71 attr[k] = nil;
71 end 72 end
72 end 73 end
73 end 74 end
74 75