summaryrefslogtreecommitdiff
path: root/tex/context/base/lxml-aux.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2010-02-01 11:19:00 +0100
committerHans Hagen <pragma@wxs.nl>2010-02-01 11:19:00 +0100
commit02588d683c22719592a349365068f7320e257bdf (patch)
tree79f6c5b6b29ace012fc6f31909e28ccbb324b64e /tex/context/base/lxml-aux.lua
parent7e1304e44d27b52b78bfaf5cfbc833cd91894182 (diff)
downloadcontext-02588d683c22719592a349365068f7320e257bdf.tar.gz
beta 2010.02.01 11:19
Diffstat (limited to 'tex/context/base/lxml-aux.lua')
-rw-r--r--tex/context/base/lxml-aux.lua23
1 files changed, 23 insertions, 0 deletions
diff --git a/tex/context/base/lxml-aux.lua b/tex/context/base/lxml-aux.lua
index 2017e6493..6b92143e7 100644
--- a/tex/context/base/lxml-aux.lua
+++ b/tex/context/base/lxml-aux.lua
@@ -335,6 +335,29 @@ end
xml.include = include
+--~ local function manipulate(xmldata,pattern,manipulator) -- untested and might go away
+--~ local collected = xmlparseapply({ xmldata },pattern)
+--~ if collected then
+--~ local xmltostring = xml.tostring
+--~ for c=1,#collected do
+--~ local e = collected[c]
+--~ local data = manipulator(xmltostring(e))
+--~ if data == "" then
+--~ epdt[e.ni] = ""
+--~ else
+--~ local xi = xmlinheritedconvert(data,xmldata)
+--~ if not xi then
+--~ epdt[e.ni] = ""
+--~ else
+--~ epdt[e.ni] = xml.body(xi) -- xml.assign(d,k,xi)
+--~ end
+--~ end
+--~ end
+--~ end
+--~ end
+
+--~ xml.manipulate = manipulate
+
function xml.strip_whitespace(root, pattern, nolines) -- strips all leading and trailing space !
local collected = xmlparseapply({ root },pattern)
if collected then