summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/xmllib.lua15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/xmllib.lua b/lib/xmllib.lua
index 007e96a..a6e97b2 100644
--- a/lib/xmllib.lua
+++ b/lib/xmllib.lua
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: xmllib.lua,v 1.10 2007-06-12 07:41:55 pixel Exp $ */
+/* $Id: xmllib.lua,v 1.11 2007-06-12 16:38:50 pixel Exp $ */
]]--
@@ -68,6 +68,13 @@ local function process_raw(xm, a)
}
end
+local function process_empty(xm)
+ return {
+ istop = true,
+ type = "empty",
+ }
+end
+
local function burrow(xm, t)
local k, v
@@ -172,10 +179,15 @@ local function render_raw(depth, v)
return v.nodes[1]
end
+local function render_empty(depth, v)
+ return ""
+end
+
local special_renders = {
comment = render_comment,
lf = render_lf,
raw = render_raw,
+ empty = render_empty,
}
local function do_render_r(v, depth)
@@ -231,6 +243,7 @@ function NewXmlMarkup()
comment = process_comment,
lf = process_lf,
raw = process_raw,
+ empty = process_empty,
tops = {},
render = do_render,
doctype = '<?xml version="1.0" encoding="UTF-8"?>',