diff options
author | Hans Hagen <pragma@wxs.nl> | 2013-01-10 01:04:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2013-01-10 01:04:00 +0100 |
commit | de9b101fa556fa74bf531774293a6913705ff5db (patch) | |
tree | e48121c15597451bdfde13ad761c765a20315b52 /tex/context/base/lxml-tab.lua | |
parent | bd5eb4cc78b64e8e905fe9dce7ed1007f4282996 (diff) | |
download | context-de9b101fa556fa74bf531774293a6913705ff5db.tar.gz |
beta 2013.01.10 01:04
Diffstat (limited to 'tex/context/base/lxml-tab.lua')
-rw-r--r-- | tex/context/base/lxml-tab.lua | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tex/context/base/lxml-tab.lua b/tex/context/base/lxml-tab.lua index 04b4192c0..3fdf6d8ff 100644 --- a/tex/context/base/lxml-tab.lua +++ b/tex/context/base/lxml-tab.lua @@ -1253,16 +1253,19 @@ function xml.parent(root) end function xml.body(root) - return (root.ri and root.dt[root.ri]) or root -- not ok yet + return root.ri and root.dt[root.ri] or root -- not ok yet end function xml.name(root) if not root then return "" - elseif root.ns == "" then - return root.tg + end + local ns = root.ns + local tg = root.tg + if ns == "" then + return tg else - return root.ns .. ":" .. root.tg + return ns .. ":" .. tg end end @@ -1292,7 +1295,7 @@ dt[k] = xml.assign(root) or xml.assign(dt,k,root) function xml.assign(dt,k,root) if dt and k then - dt[k] = (type(root) == "table" and xml.body(root)) or root + dt[k] = type(root) == "table" and xml.body(root) or root return dt[k] else return xml.body(root) |