> On 5 Oct 2020, at 22:26, Denis Maier <denis.maier.li...@mailbox.org> wrote: > > Am 05.10.2020 um 22:04 schrieb Hans Hagen: >> if it's an xml spec then using lua makes not that much sense (no gain) .. >> just process the xml > Hmm, but the XML is just a descriptive grammar of how bibliographies and > citations should be rendered. As Aditya has pointed out it's quite similar to > the role of bst style files for bibtex. So, a citeproc will take a style file > (in xml) and apply it to the metadata (based on the items actually cited in a > document).
I recall discussing this idea with Bruce D’Arcus a long time ago (somewhere in the early 00-es, maybe). The CSL files look like XML, but really they are more like a macro processing language. Parsing and interpreting that should not be all that hard, I expect. If I had to do this, I would convert the XML <macro> tags into actual lua functions while parsing the XML. The implied processing language is quite straightforward (unlike the stack-based postfix language in bibtex bst files). I don’t have time right now, but if someone reminds me in two months or so, I might have a go at it. Best wishes, Taco ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________