On 1/9/2015 12:18 PM, Hans Hagen wrote:
\startxmlsetups xml:footnote:ref \xmlfilter{main}{div[@class='footnotes']/ol/li[@id=string.sub('\xmlatt{#1}{href}',2)]/command(xml:footnote:set)} \stopxmlsetups
I'll add this: \startluacode local gsub = string.gsub function xml.expressions.idstring(str) return type(str) == "string" and gsub(str,"^#","") or "" end \stopluacode \startxmlsetups xml:footnote:ref \xmlfilter{main}{div[@class='footnotes']/ol/li[@id=idstring('\xmlatt{#1}{href}')]/command(xml:footnote:set)} \stopxmlsetups As this id stuff happens more often. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------