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