tyxml
A library for building correct HTML and SVG documents
README
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>"
Finally, TyXML can be used with Reason's JSX syntax:
open Tyxml;
let to_reason = <a href="reasonml.github.io/"> "Reason!" </a>
TyXML provides a set of combinators which use the OCaml type system
to ensure the validity of the generated document.
TyXML can be used on a wide variety of context, either to produce
textual documents, to manipulate
the DOM tree using Js_of_ocaml, build virtual DOM with virtual-dom,
or for tierless web programming with Eliom.
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
To install the JSX:
opam install tyxml-jsx
Install
- Authors
-
- Maintainers
-
Sources
tyxml-4.5.0.tbz
sha256=c69accef5df4dd89d38f6aa0baad01e8fda4e9e98bb7dad61bec1452c5716068
sha512=772535441b09c393d53c27152e65f404a0a541aa0cea1bda899a8d751ab64d1729237e583618c3ff33d75e3865d53503d1ea413c6bbc8c68c413347efd1709b3
Dependencies
Reverse Dependencies
bistro
>= "0.2.0"
current_github
>= "0.4"
datakit-ci
!= "0.12.0"
dream
>= "1.0.0~alpha2"
eliom
>= "6.11.0"
js_of_ocaml-tyxml
>= "3.3.0"
ketrew
>= "3.0.0"
memtrace_viewer
< "v0.15.0"
ocsigen-i18n
>= "3.3.0" & < "4.0.0"
ocsigenserver
>= "2.10" & < "3.0.0"
opium
>= "0.19.0"
podge
>= "0.8.0"
sihl
< "0.2.0"
tree_layout
>= "0.2"
tyxml-jsx
>= "4.5.0"
tyxml-lwd
>= "0.2"
tyxml-ppx
>= "4.5.0"
virtual_dom
>= "v0.12.0"