xmlhandlers: Remove numeric attributes

Thu, 25 Jun 2009 10:04:22 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Thu, 25 Jun 2009 10:04:22 +0500
changeset 1414
6f653b8beac9
parent 1413
b7e17efe433e
child 1415
957a81b72cb2

xmlhandlers: Remove numeric attributes

core/xmlhandlers.lua file | annotate | diff | comparison | revisions
--- a/core/xmlhandlers.lua	Thu Jun 25 08:20:38 2009 +0500
+++ b/core/xmlhandlers.lua	Thu Jun 25 10:04:22 2009 +0500
@@ -60,13 +60,14 @@
 			end
 			
 			-- FIXME !!!!!
-			for i, k in ipairs(attr) do
+			for i=1,#attr do
+				local k = attr[i];
+				attr[i] = nil;
 				local ns, nm = k:match("^([^|]+)|?([^|]-)$")
 				if ns and nm then
 					ns = ns_prefixes[ns]; 
 					if ns then 
 						attr[ns..":"..nm] = attr[k];
-						attr[i] = ns..":"..nm;
 						attr[k] = nil;
 					end
 				end

mercurial