summaryrefslogtreecommitdiff
path: root/tex/context/base/lxml-tex.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2014-06-26 12:08:00 +0200
committerHans Hagen <pragma@wxs.nl>2014-06-26 12:08:00 +0200
commit4228bf946beb4eabb1f156d889d54245651d4dff (patch)
treeaf65b7d81574d85b9e7013f463d8351464dcc01f /tex/context/base/lxml-tex.lua
parent1b5137f5fffe265b044838d6ee87d27070902180 (diff)
downloadcontext-4228bf946beb4eabb1f156d889d54245651d4dff.tar.gz
beta 2014.06.26 12:08
Diffstat (limited to 'tex/context/base/lxml-tex.lua')
-rw-r--r--tex/context/base/lxml-tex.lua19
1 files changed, 12 insertions, 7 deletions
diff --git a/tex/context/base/lxml-tex.lua b/tex/context/base/lxml-tex.lua
index c1aea3853..98f154b13 100644
--- a/tex/context/base/lxml-tex.lua
+++ b/tex/context/base/lxml-tex.lua
@@ -37,6 +37,7 @@ local xmlserialize, xmlcollect, xmltext, xmltostring = xml.serialize, xml.collec
local xmlapplylpath = xml.applylpath
local xmlunprivatized, xmlprivatetoken, xmlprivatecodes = xml.unprivatized, xml.privatetoken, xml.privatecodes
local xmlstripelement = xml.stripelement
+local xmlinclusion, xmlinclusions = xml.inclusion, xml.inclusions
local variables = interfaces and interfaces.variables or { }
@@ -518,13 +519,17 @@ function lxml.include(id,pattern,attribute,options)
stoptiming(xml)
end
-function lxml.includedfrom(id)
- local x = getid(id)
- local f = x and x.__f__
- if f then
- context(f)
- else
- -- maybe some message
+function lxml.inclusion(id,default)
+ local inclusion = xmlinclusion(getid(id),default)
+ if inclusion then
+ context(inclusion)
+ end
+end
+
+function lxml.inclusions(id,sorted)
+ local inclusions = xmlinclusions(getid(id),sorted)
+ if inclusions then
+ context(table.concat(inclusions,","))
end
end