Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here

tyxml

Build valid HTML and SVG documents

Subscribe to updates I use tyxml


Statistics on tyxml

Number of watchers on Github 53
Number of open issues 29
Average time to close an issue about 2 months
Main language OCaml
Average time to merge a PR 20 days
Open pull requests 16+
Closed pull requests 7+
Last commit almost 2 years ago
Repo Created about 6 years ago
Repo Last Updated over 1 year ago
Size 27 MB
Homepage https://ocsigen.o...
Organization / Authorocsigen
Latest Release4.2.0
Contributors27
Page Updated
Do you use tyxml? Leave a review!
View open issues (29)
View tyxml activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating tyxml for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

TyXML

TyXML is a library for building statically correct HTML5 and SVG documents:

open Tyxml
let to_ocaml = Html.(a ~a:[a_href "ocaml.org"] [pcdata "OCaml!"])

Tyxml can also be used with the standard HTML syntax, using the PPX:

open Tyxml
let%html to_ocaml = "<a href='ocaml.org'>OCaml!</a>"

TyXML provides a set of combinators. These combinators use the OCaml type system to ensure the validity of the generated document. They are used in various libraries, such as Eliom and Js_of_ocaml.

The documentation can be consulted on the TyXML website. Examples are available in the examples directory.

Installation

TyXML is available in OPAM:

opam install tyxml

To install the PPX:

opam install tyxml-ppx
tyxml open issues Ask a question     (View All Issues)
  • almost 3 years Missing `a_role`
  • almost 3 years Naming consistency
  • over 3 years Tyxml should not accept a form as an indirect descendant of another form
  • over 3 years Provide a translation module between html and js attributes
  • over 3 years Ppx ideas
  • over 3 years IDEs and the ppx
  • over 3 years Allow (optional) sloppy parsing in the ppx
  • over 3 years Covariance issues with wrapping
  • over 3 years Composability issues with the ppx
  • over 3 years Generate coverage reports to help with writing tests
  • over 3 years Figure out a way to export to lambdasoup
  • over 4 years Consistent naming scheme for html and svg elements.
  • over 4 years Merge classes when several class attributes given
  • over 4 years Templating and ppx for tyxml
  • over 5 years support for dtd parsing (depend/merge with xmllight?)
tyxml open pull requests (View All Pulls)
  • Replace some option-like variants by options.
  • Remove cellspacing, cellpadding, charoff.
  • Do not escape comments
  • Various improvements to the ppx:
  • Restore compatibility with 4.03
  • README fixes
  • Mark some HTML attributes deprecated
  • Support date-time format in <input> min, max
  • New README
  • Remove form methods PUT and DELETE
  • Type safe templating (with mustache)
  • Support for Uutf 1.0.0.
  • Added a_clip_path attribute.
  • Allow restricted flow content in dt elements
  • Simplistic indentation for the Format-based printer.
  • jbuilder WIP
tyxml list of languages used
tyxml latest release notes
4.2.0 Version 4.2.0
  • Compatibility with OCaml 4.6.0.
  • The ppx should now be compatible with driver-based workflows. In particular, jbuilder.
  • Future breakage:
    • The two camlp4-based packages (tyxml.syntax and tyxml.parser) are now deprecated and will be removed in the next major version.
    • Introduction of the tyxml-ppx ocamlfind package. Usage of the tyxml.ppx package is discouraged, and it will be removed in the next major version.
  • Various fixes in the Html_sigs.T module (contribution by Fabian Pijcke):
    • Fixed the map element function signature.
    • The elements functions now (almost) all make use of the types defined in Html_types, rather than redefining them.
    • Html_sigs.T.fieldset now takes [< legend] elt wrap as optional argument rather than legend elt wrap.
  • Add basic support for aria-* attributes (contribution by Armal Guneau) (see https://www.w3.org/TR/wai-aria-1.1/#states_and_properties)
  • Add support for the role attribute (contribution by Armal Guneau) (see https://www.w3.org/TR/role-attribute/)
  • Add support for the minlength form attribute (contribution by Armal Guneau) (See https://www.w3.org/TR/html5/forms.html#attr-input-minlength)
4.1.0 Version 4.1.0
  • Uses uutf 1.0 (contribution by Daniel Bunzli)
4.0.1 4.0.1

Version 4.0.1

  • Fix handling of comments in the ppx.
  • Fix printing of utf8 in attributes.
  • Properly flush ppx errors. This bug was causing some blank error messages.
  • Fix handling of whitespaces in <select> in the ppx.
Other projects in OCaml