diff options
author | Hans Hagen <pragma@wxs.nl> | 2021-06-04 18:35:45 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2021-06-04 18:35:45 +0200 |
commit | 75be509021abdcd01f7d5caf35d026647042322a (patch) | |
tree | f9c31e9e694c958a65c383c9dcccb5e29a9a1709 /tex/context/base/mkiv/lxml-tex.lua | |
parent | 268cc2e9f10c887b29ac2136e9a0cdf40e464796 (diff) | |
download | context-75be509021abdcd01f7d5caf35d026647042322a.tar.gz |
2021-06-04 17:23:00
Diffstat (limited to 'tex/context/base/mkiv/lxml-tex.lua')
-rw-r--r-- | tex/context/base/mkiv/lxml-tex.lua | 22 |
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 |