Mercurial > prosody-hg
comparison core/xmlhandlers.lua @ 149:40e443eacbbd
Partial s2s commit
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 24 Oct 2008 07:34:13 +0100 |
| parents | ba08b8a4eeef |
| children | d09b8a1ab046 |
comparison
equal
deleted
inserted
replaced
| 143:e0f20546cd68 | 149:40e443eacbbd |
|---|---|
| 1 | 1 |
| 2 require "util.stanza" | 2 require "util.stanza" |
| 3 | 3 |
| 4 local st = stanza; | 4 local st = stanza; |
| 5 local tostring = tostring; | 5 local tostring = tostring; |
| 6 local pairs = pairs; | |
| 7 local ipairs = ipairs; | |
| 8 local type = type; | |
| 9 local print = print; | |
| 6 local format = string.format; | 10 local format = string.format; |
| 7 local m_random = math.random; | 11 local m_random = math.random; |
| 8 local t_insert = table.insert; | 12 local t_insert = table.insert; |
| 9 local t_remove = table.remove; | 13 local t_remove = table.remove; |
| 10 local t_concat = table.concat; | 14 local t_concat = table.concat; |
| 12 local sm_destroy_session = import("core.sessionmanager", "destroy_session"); | 16 local sm_destroy_session = import("core.sessionmanager", "destroy_session"); |
| 13 | 17 |
| 14 local error = error; | 18 local error = error; |
| 15 | 19 |
| 16 module "xmlhandlers" | 20 module "xmlhandlers" |
| 21 | |
| 22 local ns_prefixes = { | |
| 23 ["http://www.w3.org/XML/1998/namespace"] = "xml"; | |
| 24 } | |
| 17 | 25 |
| 18 function init_xmlhandlers(session, streamopened) | 26 function init_xmlhandlers(session, streamopened) |
| 19 local ns_stack = { "" }; | 27 local ns_stack = { "" }; |
| 20 local curr_ns = ""; | 28 local curr_ns = ""; |
| 21 local curr_tag; | 29 local curr_tag; |
