summaryrefslogtreecommitdiff
path: root/tex/context/base/lxml-tab.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/lxml-tab.lua')
-rw-r--r--tex/context/base/lxml-tab.lua13
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)