Hi,
I'd like to write a Lua function that processes the href attribute from a
HTML file and outputs different content depending on the URL.
However, I don't know how to convert the XML attribute and the contents of
the link tag to a string value for the Lua function. I've tried the
following, which does not work but makes my intention clearer:
\startxmlsetups xml:a
\directlua{getlinkcode("\\xmlatt{#1}{href}", "\\xmlflush{#1}")}
\stopxmlsetups
It's probably calls to lxml.att and lxml.flush instead of the strings, but
how do I convert the "#1" ?
Kind regards,
Gabriel
--
Gabriel Birke
Open Science Lab
Technische Informationsbibliothek / German National Library of Science and
Technology
Welfengarten 1 B, 30167 Hannover, Germany
Telefon: +49 511 762 14235
E-Mail: [email protected]
Internet: http://www.tib.uni-hannover.de
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________