Parameter Make.N

type t
val equal : t -> t -> bool

Node identity, used to locate a node among its siblings.

val name : t -> string option

The element name (e.g. "div"), or None for an anonymous node.

val id : t -> string option

The id attribute, or None.

val classes : t -> string list

The class names from the class attribute.

val attribute : t -> string -> string option

attribute t name is the value of attribute name, or None.

val parent : t -> t option

The parent element, or None at the root.

val children : t -> t list

The child elements, in document order.

val text_children : t -> string list

The data of the node's direct child text nodes, in document order, and [] for an element that holds none. Only text counts: a comment or a processing instruction is not a text node and must not be reported here, since neither affects whether the element is :empty (selectors-4 sec. 13.2). A backend that answers [] for an element that does hold text makes that element match :empty.