summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/lxml-dir.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/lxml-dir.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/lxml-dir.lua18
1 files changed, 9 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/context/base/lxml-dir.lua b/Master/texmf-dist/tex/context/base/lxml-dir.lua
index 617ce3e20e2..0924931c1b5 100644
--- a/Master/texmf-dist/tex/context/base/lxml-dir.lua
+++ b/Master/texmf-dist/tex/context/base/lxml-dir.lua
@@ -7,9 +7,8 @@ if not modules then modules = { } end modules ['lxml-dir'] = {
}
local format, gsub = string.format, string.gsub
-local get_id = lxml.id
+local getid = lxml.getid
local texsprint, ctxcatcodes = tex.sprint, tex.ctxcatcodes
-local xmlparseapply = xml.parse_apply
--~ <?xml version="1.0" standalone="yes"?>
--~ <!-- demo.cdx -->
@@ -26,12 +25,13 @@ local xmlparseapply = xml.parse_apply
--~ <directive attribute='cdx' value="*" element="cals:table" setup="cdx:cals:table:*"/>
--~ </directives>
+local lxml = lxml
-
-lxml.directives = lxml.directives or { }
-
+lxml.directives = lxml.directives or { }
local directives = lxml.directives
+local report_lxml = logs.reporter("xml","tex")
+
local data = {
setup = { },
before = { },
@@ -43,7 +43,7 @@ local function load_setup(filename)
if fullname ~= "" then
filename = fullname
end
- local collection = xmlparseapply({ get_id(xml.load(filename)) },"directive")
+ local collection = xml.applylpath({ getid(xml.load(filename)) },"directive") -- is { } needed ?
if collection then
local valid = 0
for i=1,#collection do
@@ -60,14 +60,14 @@ local function load_setup(filename)
valid = valid + 1
end
end
- commands.writestatus("lxml","%s directives found in '%s', %s valid",#collection,filename,valid)
+ report_lxml("%s directives found in '%s', %s valid",#collection,filename,valid)
else
- commands.writestatus("lxml","no directives found in '%s'",filename)
+ report_lxml("no directives found in '%s'",filename)
end
end
local function handle_setup(category,root,attribute,element)
- root = get_id(root)
+ root = getid(root)
if attribute then
local value = root.at[attribute]
if value then