package eliom

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Low-level XML manipulation.

Base functions

See <<a_api project="tyxml" | module Xml_sigs.Iterable >> .

include Xml_sigs.Iterable with type 'a wrap = 'a and type 'a list_wrap = 'a list and type event_handler = (Js_of_ocaml.Dom_html.event Js_of_ocaml.Js.t -> unit) Eliom_client_value.t and type mouse_event_handler = (Js_of_ocaml.Dom_html.mouseEvent Js_of_ocaml.Js.t -> unit) Eliom_client_value.t and type keyboard_event_handler = (Js_of_ocaml.Dom_html.keyboardEvent Js_of_ocaml.Js.t -> unit) Eliom_client_value.t and type touch_event_handler = (Js_of_ocaml.Dom_html.touchEvent Js_of_ocaml.Js.t -> unit) Eliom_client_value.t
include Xml_sigs.NoWrap with type 'a wrap = 'a with type 'a list_wrap = 'a list with type event_handler = (Js_of_ocaml.Dom_html.event Js_of_ocaml.Js.t -> unit) Eliom_client_value.t with type mouse_event_handler = (Js_of_ocaml.Dom_html.mouseEvent Js_of_ocaml.Js.t -> unit) Eliom_client_value.t with type keyboard_event_handler = (Js_of_ocaml.Dom_html.keyboardEvent Js_of_ocaml.Js.t -> unit) Eliom_client_value.t with type touch_event_handler = (Js_of_ocaml.Dom_html.touchEvent Js_of_ocaml.Js.t -> unit) Eliom_client_value.t
module W = Xml_wrap.NoWrap
type 'a wrap = 'a
type 'a list_wrap = 'a list
type uri
val string_of_uri : (uri, string) W.ft
val uri_of_string : (string, uri) W.ft
type aname = string
type attrib
val float_attrib : aname -> float wrap -> attrib
val int_attrib : aname -> int wrap -> attrib
val string_attrib : aname -> string wrap -> attrib
val space_sep_attrib : aname -> string list wrap -> attrib
val comma_sep_attrib : aname -> string list wrap -> attrib
val event_handler_attrib : aname -> event_handler -> attrib
val mouse_event_handler_attrib : aname -> mouse_event_handler -> attrib
val keyboard_event_handler_attrib : aname -> keyboard_event_handler -> attrib
val touch_event_handler_attrib : aname -> touch_event_handler -> attrib
val uri_attrib : aname -> uri wrap -> attrib
val uris_attrib : aname -> uri list wrap -> attrib
type elt
type ename = string
val empty : unit -> elt
val comment : string -> elt
val pcdata : string wrap -> elt
val encodedpcdata : string wrap -> elt
val entity : string -> elt
val leaf : ?a:attrib list -> ename -> elt
val node : ?a:attrib list -> ename -> elt list_wrap -> elt
val cdata : string -> elt
val cdata_script : string -> elt
val cdata_style : string -> elt
type separator =
  1. | Space
  2. | Comma
val aname : attrib -> aname
type acontent = private
  1. | AFloat of float
  2. | AInt of int
  3. | AStr of string
  4. | AStrL of separator * string list
val acontent : attrib -> acontent
type econtent = private
  1. | Empty
  2. | Comment of string
  3. | EncodedPCDATA of string
  4. | PCDATA of string
  5. | Entity of string
  6. | Leaf of ename * attrib list
  7. | Node of ename * attrib list * elt list
val content : elt -> econtent

Unique nodes

Unique nodes are XML nodes that are manipulated 'by reference' when sent to the client part of an Eliom-application: the created element is allocated only one time in each instance of an application. See <<a_manual chapter="clientserver-html" fragment="unique" |the eliom manual>> for more details.

Event handlers

type caml_event_handler

Values of type caml_event_handler represents event handler build with the {{ ... }} syntax (see the Eliom manual for more information on <<a_manual chapter="clientserver-html" fragment="syntax"|syntax extension>>). Such values are expected by functions like Eliom_content.Html.a_onclick.

val wrap : elt -> 'a -> 'a Eliom_wrap.wrapped_value

Eliom_content.Xml.wrap page v is like Eliom_wrap.wrap v but it makes sure that all elts in v which are included in page are sent with empty content. This is safe because such elements will be taken from the DOM on the client either ways.

OCaml

Innovation. Community. Security.