summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/lxml-tex.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/lxml-tex.lua')
-rw-r--r--tex/context/base/mkiv/lxml-tex.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/lxml-tex.lua b/tex/context/base/mkiv/lxml-tex.lua
index 75bd9b84c..148484f51 100644
--- a/tex/context/base/mkiv/lxml-tex.lua
+++ b/tex/context/base/mkiv/lxml-tex.lua
@@ -2070,6 +2070,28 @@ do
end
end
+ function lxml.ifatt(id,a,value)
+ local e = getid(id)
+ if e then
+ local at = e.at
+ att = at and at[a] or ""
+ else
+ att = ""
+ end
+ return att == value
+ end
+
+ function lxml.ifattempty(id,a)
+ local e = getid(id)
+ if e then
+ local at = e.at
+ if at and at[a] ~= "" then
+ return true
+ end
+ end
+ return false
+ end
+
function lxml.refatt(id,a)
local e = getid(id)
if e then