diff options
author | Hans Hagen <pragma@wxs.nl> | 2020-03-26 22:27:51 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2020-03-26 22:27:51 +0100 |
commit | d9aa299de0f736f75f90b98ab284e5bc73515949 (patch) | |
tree | 080ffe743d8cb15f2c6b8d4f3ca06219cff3228d /tex/context/base/mkiv/lxml-tab.lua | |
parent | 0b0256403b7e111df0ecdb8ca589f20df787dacd (diff) | |
download | context-d9aa299de0f736f75f90b98ab284e5bc73515949.tar.gz |
2020-03-26 21:49:00
Diffstat (limited to 'tex/context/base/mkiv/lxml-tab.lua')
-rw-r--r-- | tex/context/base/mkiv/lxml-tab.lua | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/lxml-tab.lua b/tex/context/base/mkiv/lxml-tab.lua index 8f6379f2f..1ef82d74d 100644 --- a/tex/context/base/mkiv/lxml-tab.lua +++ b/tex/context/base/mkiv/lxml-tab.lua @@ -1292,13 +1292,26 @@ end xml.convert = xmlconvert -function xml.inheritedconvert(data,xmldata) -- xmldata is parent +function xml.inheritedconvert(data,xmldata,cleanup) -- xmldata is parent local settings = xmldata.settings if settings then settings.parent_root = xmldata -- to be tested end -- settings.no_root = true local xc = xmlconvert(data,settings) -- hm, we might need to locate settings + if cleanup then + local x = xc.dt + if x then + x = x[1] + if x and x.tg == "@pi@" then + local dt = x.dt + local pi = dt and dt[1] + if type(pi) == "string" and find(pi,"^xml") then + remove(dt,1) + end + end + end + end -- xc.settings = nil -- xc.entities = nil -- xc.special = nil |