Software /
code /
prosody
Comparison
core/xmlhandlers.lua @ 1013:943f2cd7e480
Merging stable into unstable
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 20 Apr 2009 03:03:07 +0100 |
parent | 1003:afae75e37ceb |
child | 1051:0327c569eb1a |
comparison
equal
deleted
inserted
replaced
1012:d53108635407 | 1013:943f2cd7e480 |
---|---|
55 if stanza and #chardata > 0 then | 55 if stanza and #chardata > 0 then |
56 -- We have some character data in the buffer | 56 -- We have some character data in the buffer |
57 stanza:text(t_concat(chardata)); | 57 stanza:text(t_concat(chardata)); |
58 chardata = {}; | 58 chardata = {}; |
59 end | 59 end |
60 local curr_ns,name = tagname:match("^(.+)|([%w%-]+)$"); | 60 local curr_ns,name = tagname:match("^(.+)|([^%|]+)$"); |
61 if curr_ns ~= stream_default_ns then | 61 if curr_ns ~= stream_default_ns then |
62 attr.xmlns = curr_ns; | 62 attr.xmlns = curr_ns; |
63 end | 63 end |
64 | 64 |
65 -- FIXME !!!!! | 65 -- FIXME !!!!! |
107 if stanza then | 107 if stanza then |
108 t_insert(chardata, data); | 108 t_insert(chardata, data); |
109 end | 109 end |
110 end | 110 end |
111 function xml_handlers:EndElement(tagname) | 111 function xml_handlers:EndElement(tagname) |
112 curr_ns,name = tagname:match("^(.+)|([%w%-]+)$"); | 112 curr_ns,name = tagname:match("^(.+)|([^%|]+)$"); |
113 if (not stanza) or (#stanza.last_add > 0 and name ~= stanza.last_add[#stanza.last_add].name) then | 113 if (not stanza) or (#stanza.last_add > 0 and name ~= stanza.last_add[#stanza.last_add].name) then |
114 if tagname == stream_tag then | 114 if tagname == stream_tag then |
115 if cb_streamclosed then | 115 if cb_streamclosed then |
116 cb_streamclosed(session); | 116 cb_streamclosed(session); |
117 end | 117 end |