diff options
author | Marius <mariausol@gmail.com> | 2013-01-10 02:20:15 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-01-10 02:20:15 +0200 |
commit | d38d94fe9542984e38b9839eb2383656328b9da9 (patch) | |
tree | 2b14bc228f545d31c35076e1e395113c3abdf393 /tex/context/base/lxml-tab.lua | |
parent | 0f948daabca9dcfb92d6325b9a7a5edba22c5abb (diff) | |
download | context-d38d94fe9542984e38b9839eb2383656328b9da9.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) |