package tyxml

  1. Overview
  2. Docs
TyXML is a library for building correct HTML and SVG documents

Install

Dune Dependency

Authors

Maintainers

Sources

tyxml-4.3.0.tbz
sha256=6e1bd76b184eb8bf43550138fa1e14f03b5761187ff38891179a36bdddbdbfc3
md5=fd834a567f813bf447cab5f4c3a723e2

Description

TyXML provides a set of convenient combinators that uses the OCaml type system to ensure the validity of the generated documents. TyXML can be used with any representation of HTML and SVG: the textual one, provided directly by this package, or DOM trees (js_of_ocaml-tyxml) virtual DOM (virtual-dom) and reactive or replicated trees (eliom). You can also create your own representation and use it to instantiate a new set of combinators.

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

Published: 19 Nov 2018

README

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"] [txt "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

Dependencies (7)

  1. uutf >= "1.0.0"
  2. seq
  3. dune
  4. re >= "1.8.0"
  5. ocaml >= "4.07"
  6. re >= "1.5.0"
  7. ocaml >= "4.02" & < "5.0"

Dev Dependencies (1)

  1. alcotest with-test

Conflicts

None

OCaml

Innovation. Community. Security.