Re: [NTG-context] XML expression to read HTML classes

2015-08-27 Thread Hans Hagen
On 8/27/2015 10:57 PM, Hans Hagen wrote: On 8/25/2015 5:05 PM, mass...@fastwebnet.it wrote: Hello list, I'm working on HTML typesetting with ConTeXt. I wrote a custom expression to test whether an element has a class: function xml.functions.classes(classAttr) local classes = {} if classAt

Re: [NTG-context] XML expression to read HTML classes

2015-08-27 Thread Hans Hagen
On 8/25/2015 5:05 PM, mass...@fastwebnet.it wrote: Hello list, I'm working on HTML typesetting with ConTeXt. I wrote a custom expression to test whether an element has a class: function xml.functions.classes(classAttr) local classes = {} if classAttr then for c in string.gmatch(classA

Re: [NTG-context] XML expression to read HTML classes

2015-08-26 Thread massifr
A working example to clarify my request: \startluacode -- splits the attribute class using spaces as classes' separator -- returns an array of strings function xml.functions.classes(classAttr) local classes = {} if classAttr then for c in string.gmatch(classAttr, "%S+") do

[NTG-context] XML expression to read HTML classes

2015-08-25 Thread massifr
Hello list, I'm working on HTML typesetting with ConTeXt. I wrote a custom expression to test whether an element has a class: function xml.functions.classes(classAttr) local classes = {} if classAttr then for c in string.gmatch(classAttr, "%S+") do if (string.len(c) > 0) then classes