package tyxml
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=b7dbb6dbb8a02c0ab62f078695af6fbb636d162bd0f341fc9bda7d88ef9a1dfa
md5=7e80bfe81bd9fb1063ee12e35198211a
Description
TyXML allows you to build HTML5 and SVG trees whose validity is ensured by the typechecker. It provides a printer for said XML trees, along with a ppx syntax extension. Finally it also provides a functorial interface to choose your XML datastructure. It's part of the ocsigen project and is used in js_of_ocaml and eliom.
Published: 31 Oct 2016
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"] [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
Dependencies (6)
-
re
>= "1.5.0"
- base-bytes
-
uutf
<= "0.9.4"
-
ocamlbuild
build
-
ocamlfind
build
-
ocaml
>= "4.02" & < "5.0"
Dev Dependencies (1)
-
alcotest
with-test
Used by (23)
- ansi
-
ansi-parse
< "0.4.0"
- benchpress-server
-
bistro
>= "0.2.0" & < "0.5.0"
- bistro-bio
-
bookaml
!= "3.1"
- current_ansi
-
current_web
< "0.5"
- datakit-ci
- doc-ock-html
-
eliom
>= "6.0.0" & < "6.5.0"
-
js_of_ocaml-tyxml
< "3.3.0"
- junit
-
ketrew
>= "3.0.0"
-
mastodon-archive-viewer
< "0.4.0"
-
ocsigen-i18n
= "3.2.0"
-
ocsigenserver
>= "2.8" & < "3.0.0"
-
odoc
< "1.4.0"
- plotkicadsch
-
podge
>= "0.8.0"
-
tyxml-lwd
< "0.2"
-
tyxml-ppx
= "4.0.1"
-
virtual_dom
< "v0.12.0"
Conflicts (1)
-
ppx_tools
< "5.0"