OCaml HTML5 parser/serialiser based on Python's JustHTML
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at e51bb723f481ed8ef0938e71bdb6e3a2370cbc1f 21 lines 861 B view raw
1(** HTML5 element content models. 2 3 Defines what children an element can contain. *) 4 5type t = 6 | Nothing (** No children allowed (void elements) *) 7 | Text (** Text only (no elements) *) 8 | Transparent (** Inherits parent's content model *) 9 | Categories of Content_category.t list (** Elements from categories *) 10 | Elements of string list (** Specific elements only *) 11 | Mixed of Content_category.t list (** Text + elements from categories *) 12 | One_or_more of t (** At least one child matching *) 13 | Zero_or_more of t (** Any number of children matching *) 14 | Optional of t (** Zero or one child matching *) 15 | Sequence of t list (** Ordered sequence *) 16 | Choice of t list (** Any one of *) 17 | Except of t * Content_category.t list (** t except categories *) 18 19val pp : Format.formatter -> t -> unit 20 21val to_string : t -> string