summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/lxml-dir.lua
diff options
context:
space:
mode:
authorMojca Miklavec <mojca.miklavec@gmail.com>2012-05-14 17:38:55 +0000
committerMojca Miklavec <mojca.miklavec@gmail.com>2012-05-14 17:38:55 +0000
commit15995e10bfc68edf79970c4ea4fbb6678566c46e (patch)
tree2de7ca2a83f2d37ef043ad7429a5cb945bb79ddb /Master/texmf-dist/tex/context/base/lxml-dir.lua
parentc9a39f716f1e5ec820ed3aab2c9aef25c5a9d730 (diff)
ConTeXt 2012.05.14 16:00
git-svn-id: svn://tug.org/texlive/trunk@26371 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/lxml-dir.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/lxml-dir.lua11
1 files changed, 6 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/context/base/lxml-dir.lua b/Master/texmf-dist/tex/context/base/lxml-dir.lua
index 0924931c1b5..00375193f0f 100644
--- a/Master/texmf-dist/tex/context/base/lxml-dir.lua
+++ b/Master/texmf-dist/tex/context/base/lxml-dir.lua
@@ -7,8 +7,6 @@ if not modules then modules = { } end modules ['lxml-dir'] = {
}
local format, gsub = string.format, string.gsub
-local getid = lxml.getid
-local texsprint, ctxcatcodes = tex.sprint, tex.ctxcatcodes
--~ <?xml version="1.0" standalone="yes"?>
--~ <!-- demo.cdx -->
@@ -25,7 +23,9 @@ local texsprint, ctxcatcodes = tex.sprint, tex.ctxcatcodes
--~ <directive attribute='cdx' value="*" element="cals:table" setup="cdx:cals:table:*"/>
--~ </directives>
-local lxml = lxml
+local lxml, context = lxml, context
+
+local getid = lxml.getid
lxml.directives = lxml.directives or { }
local directives = lxml.directives
@@ -84,14 +84,15 @@ local function handle_setup(category,root,attribute,element)
setup = setup[category]
end
if setup then
- texsprint(ctxcatcodes,"\\directsetup{",setup,"}")
+ context.directsetup(setup)
else
setup = data[format("%s::%s::*",element,attribute)]
if setup then
setup = setup[category]
end
if setup then
- texsprint(ctxcatcodes,"\\directsetup{",gsub(setup,'%*',value),"}")
+ setup = gsub(setup,'%*',value)
+ context.directsetup(setup)
end
end
end