summaryrefslogtreecommitdiff
path: root/tex/context/base/lxml-aux.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2014-07-09 10:26:00 +0200
committerHans Hagen <pragma@wxs.nl>2014-07-09 10:26:00 +0200
commit305f6529b5970f953803716fb0e475c7f52ff3b5 (patch)
treecb12e68f1c1aa8e22a7a3f06bd7bc91f63add0b8 /tex/context/base/lxml-aux.lua
parent19e6c5feec9f26dd796a135d3f2924b9b15a998a (diff)
downloadcontext-305f6529b5970f953803716fb0e475c7f52ff3b5.tar.gz
beta 2014.07.09 10:26
Diffstat (limited to 'tex/context/base/lxml-aux.lua')
-rw-r--r--tex/context/base/lxml-aux.lua12
1 files changed, 4 insertions, 8 deletions
diff --git a/tex/context/base/lxml-aux.lua b/tex/context/base/lxml-aux.lua
index b3f1684e7..3f502df44 100644
--- a/tex/context/base/lxml-aux.lua
+++ b/tex/context/base/lxml-aux.lua
@@ -364,10 +364,9 @@ xml.injectafter = inject_element
xml.injectbefore = function(r,p,e) inject_element(r,p,e,true) end
local function include(xmldata,pattern,attribute,recursive,loaddata)
- -- parse="text" (default: xml), encoding="" (todo)
- -- attribute = attribute or 'href'
- pattern = pattern or 'include'
- loaddata = loaddata or io.loaddata
+ -- attribute = attribute or 'href'
+ pattern = pattern or 'include'
+ loaddata = loaddata or io.loaddata
local collected = xmlapplylpath(xmldata,pattern)
if collected then
for c=1,#collected do
@@ -386,16 +385,13 @@ local function include(xmldata,pattern,attribute,recursive,loaddata)
if name then break end
end
end
- local data = (name and name ~= "" and loaddata(name)) or ""
+ local data = name and name ~= "" and loaddata(name) or ""
if data == "" then
epdt[ek.ni] = "" -- xml.empty(d,k)
elseif ekat["parse"] == "text" then
-- for the moment hard coded
epdt[ek.ni] = xml.escaped(data) -- d[k] = xml.escaped(data)
else
---~ local settings = xmldata.settings
---~ settings.parent_root = xmldata -- to be tested
---~ local xi = xmlconvert(data,settings)
local xi = xmlinheritedconvert(data,xmldata)
if not xi then
epdt[ek.ni] = "" -- xml.empty(d,k)