diff options
author | Norbert Preining <preining@logic.at> | 2013-05-27 01:55:10 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2013-05-27 01:55:10 +0000 |
commit | 2ddd33f9dce3a1254f97dc5e560f9576ba63f3ef (patch) | |
tree | 16db9c0b6f9d9113fda2edd944a5ec5169bb298f /Master/texmf-dist/tex/luatex/luaxml/luaxml-mod-handler.lua | |
parent | 0da954038fc199402b8d190a323de81a997709c4 (diff) |
luaxml update 5/27
git-svn-id: svn://tug.org/texlive/trunk@30712 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaxml/luaxml-mod-handler.lua')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luaxml/luaxml-mod-handler.lua | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaxml/luaxml-mod-handler.lua b/Master/texmf-dist/tex/luatex/luaxml/luaxml-mod-handler.lua index bc4d8ea9120..19e4ac11358 100644 --- a/Master/texmf-dist/tex/luatex/luaxml/luaxml-mod-handler.lua +++ b/Master/texmf-dist/tex/luatex/luaxml/luaxml-mod-handler.lua @@ -1,4 +1,4 @@ -module(...,package.seeall) +--..module(...,package.seeall) -- -- Overview: -- ========= @@ -111,9 +111,10 @@ module(...,package.seeall) --@param t Table to be parsed --@returns Returns a string representation of table +local M = {} local stack = require("luaxml-stack") -function showTable(t) +local function showTable(t) local sep = '' local res = '' if type(t) ~= 'table' then @@ -129,9 +130,12 @@ function showTable(t) res = '{'..res..'}' return res end - + + +M.showTable = showTable + ---Handler to generate a simple event trace -printHandler = function() +local printHandler = function() local obj = {} obj.starttag = function(self,t,a,s,e) io.write("Start : "..t.."\n") @@ -179,9 +183,9 @@ printHandler = function() end return obj end - +M.printHandler = printHandler ---Handler to generate a lua table from a XML content string -function simpleTreeHandler() +local function simpleTreeHandler() local obj = {} obj.root = {} @@ -242,10 +246,10 @@ function simpleTreeHandler() return obj end - +M.simpleTreeHandler = simpleTreeHandler --- domHandler -function domHandler() +local function domHandler() local obj = {} obj.options = {commentNode=1,piNode=1,dtdNode=1,declNode=1} obj.root = { _children = {n=0}, _type = "ROOT" } @@ -309,9 +313,10 @@ function domHandler() obj.cdata = obj.text return obj end +M.domHandler = domHandler -- -simpleTeXhandler=function() +local simpleTeXhandler=function() local obj={} local _stack=stack.Stack:Create() obj.starttag = function(self,t,a,s,e) @@ -336,3 +341,5 @@ simpleTeXhandler=function() end return obj end +M.simpleTeXhandler = simpleTeXhandler +return M |