package tyxml
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=c725bb8918ff1b601e7926b7b6b4799f8f4ab70f5fba9f0970da657cb82c07f2
sha512=61881aa7101b5072b887802e78897920516c9c2b484d51ac281509e83c79969c7654caa31b125ad843b45740dfe143ed5218fd7e4d98dfba8e0b24b272308ed6
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.
Added to opam-repository:
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>"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 tyxmlTo install the PPX:
opam install tyxml-ppxTo install the JSX:
opam install tyxml-jsx
Used by (35)
- ansi
- ansi-parse
- biotk
- bistro
- bistro-bio
- builder-web
- caldav
-
coq-lsp
>= "0.2.4+8.20" - current_ansi
- current_github
-
current_web
>= "0.7.1" -
dream
>= "1.0.0~alpha2" - janestreet_csv
- js_of_ocaml-tyxml
- junit
- markdown
- mastodon-archive-viewer
-
memtrace_viewer
< "v0.15.0" - netkat
-
ocsigen-i18n
!= "4.0.0" -
ocsigenserver
< "3.0.0" - odoc
- opam-graph
-
opium
>= "0.19.0" - plotkicadsch
- printbox-ext-plot
- printbox-html
- serde_xml
- sherlodoc
-
sihl
< "0.2.0" -
tree_layout
>= "0.2" -
tyxml-jsx
>= "5.0.0" -
tyxml-ppx
>= "5.0.0" - vif
- virtual_dom
Conflicts
None