Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templating and ppx for tyxml #68

Open
Drup opened this issue Feb 11, 2015 · 5 comments · Fixed by #89
Open

Templating and ppx for tyxml #68

Drup opened this issue Feb 11, 2015 · 5 comments · Fixed by #89

Comments

@Drup
Copy link
Member

Drup commented Feb 11, 2015

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:

  1. 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.
  2. 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
  3. 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.
@Drup
Copy link
Member Author

Drup commented Jan 18, 2016

A lightweight resilient html5 parser is now available: https://github.com/aantron/markup.ml/

@Drup
Copy link
Member Author

Drup commented Feb 11, 2016

On point 2., also see #72

@Drup Drup added this to the 4.0 milestone Feb 23, 2016
@aantron aantron mentioned this issue Feb 26, 2016
19 tasks
@aantron
Copy link
Contributor

aantron commented Feb 26, 2016

Can you give some more detail on what you would want for the second (non-syntax) part of point 3?

@Drup
Copy link
Member Author

Drup commented Feb 26, 2016

Well, basically, create an executable that takes a file containing bits of html or svg (like some templating thingy) and output an ocaml file. We could reuse some classic template syntax such as mustache.

@Drup Drup closed this as completed in #89 Apr 1, 2016
@Drup Drup reopened this Apr 1, 2016
@Drup Drup modified the milestones: later, 4.0 Apr 11, 2016
@Drup
Copy link
Member Author

Drup commented May 7, 2016

WIP version in #128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants