# \[ANN\] TyXML 5.0.0

**URL:** <https://discuss.ocaml.org/t/ann-tyxml-5-0-0/18516>\
**Category:** Ecosystem\
**Tags:** web, ocsigen\
**Created:** [September 8, 2026, 11:51am UTC](https://discuss.ocaml.org/t/ann-tyxml-5-0-0/18516 "2026-09-08T11:51:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vincent\_Balat](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/vincent_balat/32/2191_2.png) [@Vincent\_Balat](https://discuss.ocaml.org/u/Vincent_Balat)\
**Post date:** [September 8, 2026, 11:51am UTC](https://discuss.ocaml.org/t/ann-tyxml-5-0-0/18516/1 "2026-09-08T11:51:46Z")

</div>

We are happy to announce **TyXML 5.0.0** , a major release. TyXML builds HTML and SVG documents whose validity is checked by the OCaml type system: an element the specification does not allow in a given position does not typecheck. The library now follows the current specifications, the WHATWG living standard for HTML and SVG 2 with the Filter Effects module, where SVG support had not moved since SVG 1.1.

Highlights:

- **HTML** : popover, invoker commands, microdata, declarative shadow DOM and CSS shadow parts, `loading`/`decoding`/`fetchpriority`, `blocking`, the new elements `s`, `bdi`, `search`, `data`, `slot` and `track`, the event handler attributes that were missing (the pointer family, clipboard, `ontoggle`, `onscrollend` and friends), and content models brought in line with the standard.
- **SVG** : `mask` was declared in `Svg_types` but the element itself was missing, `feMerge` could be given no child because `feMergeNode` did not exist, and about thirty presentation attributes had a type tag but no function to produce them. All of those are in, together with the SVG 2 additions, ARIA support, the SVG 2 link attributes, and content models widened to SVG 2.
- **The PPX and JSX syntaxes** : no camel case SVG attribute was recognised, so `viewBox`, `stdDeviation`, `preserveAspectRatio` and most others were rejected, which means most real SVG could not be written with the PPX at all. Whitespace between SVG tags is also ignored now where the content model does not accept text, so indented SVG typechecks.
- **Constructs that no program could actually use** are fixed: `area` had no `href` and its tag was in no content model, so a `map` containing areas fitted nowhere; `symbol` accepted no core attributes, hence no `id` and no way to reference it; the `li` children of `menu` could not be built. Several attribute names were also emitted misspelled, which is worse than a compile error since the output looks fine. Breaking changes worth knowing about: `hidden` and `contenteditable` take an enumerated argument, the URL-valued attributes go through `Xml.uri`, SVG documents are printed without the SVG 1.1 doctype, `Wrapped_functions` has four new functions for implementers of the functorial interface, and the build requires OCaml 4.08, dune 3.18 and ppxlib 0.36.

```auto
opam install tyxml

```

- Blog post with the details: [TyXML 5.0.0: the HTML living standard and SVG 2 — Ocsigen](https://ocsigen.org/blog/posts/tyxml-5.0.0.html)
- Changelog: [tyxml/CHANGES.md at master · ocsigen/tyxml · GitHub](https://github.com/ocsigen/tyxml/blob/master/CHANGES.md)
- Manual and API: [TyXML documentation](https://ocsigen.org/tyxml/latest/)

Thanks to everyone who contributed to this release, in particular Hugo Heuzard, Martin Bodin, toastal, Sylvain Boilard, rand00, Sora Morimoto, Patrick Ferris and Gabriel Radanne. Bug reports and pull requests are welcome on [GitHub - ocsigen/tyxml: Build valid HTML and SVG documents · GitHub](https://github.com/ocsigen/tyxml).
