Join Nostr
2025-03-28 14:19:04 UTC
in reply to

Owen Lynch on Nostr: nprofile1q…d6kk0 The concern about XML, that it exposes internal Forester ...

The concern about XML, that it exposes internal Forester abstractions that are changing quickly, definitely makes sense to me.

I worry that moving the XML to mirror the Forester IR would lead to a duplication between xslt and Forester itself though.

Here's a concept: what if the rendering stage uses something like a tagless final encoding, where we have a module signature which contains methods for each node in the current XML spec. Implementing this module signature would be essentially a cheap, typed version of the current xslt files.

Then using Dynlink, Forester could pull in additional backends at runtime.

This is similar to the Pandoc strategy for custom writers via Lua, except using OCaml rather than Lua.