Open
Description
There has been several request of a templating method in tyxml. Also, with the various other ppx coming, finally cleaning up the syntax extension question might be a good idea.
Here are my notes and ideas on how to do it:
- Having a decent html parsing library. Either we use something simple that only parses valid html, or something more complicated (see this discussion in particular). It doesn't have to be the first thing done.
- Create a systematic way to translate html documents into tyxml function. Currently, some functions in tyxml are not exactly the html element's name (because of syntactic restriction in html, or disambiguation, and so on). This would also be the occasion to normalize and rationalize tyxml's naming convention. @eyyub started such work in https://github.com/Eyyub/ppx_tyxml
- Write a ppx for a syntax extension and something that can take an html tree with holes and produce an ocaml function out of it. It will basically be the exact same thing anyway.