Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Functor XML_iter.Make

module Make : functor (XML : XML_sigs.Iterable) -> 
  sig..end

Parameters :

XML:XML_sigs.Iterable

val amap : 
  (XML.ename -> XML.attrib list -> XML.attrib list) ->
  XML.elt -> XML.elt

Recursively edit attributes for the element and all its children.

val amap1 : 
  (XML.ename -> XML.attrib list -> XML.attrib list) ->
  XML.elt -> XML.elt

Edit attributes only for one element.


The following can safely be exported by higher level libraries, because removing an attribute from a element is always legal.

val rm_attrib : (XML.aname -> bool) -> XML.attrib list -> XML.attrib list
val rm_attrib_from_list : 
  (XML.aname -> bool) ->
  (string -> bool) -> XML.attrib list -> XML.attrib list
val map_int_attrib : 
  (XML.aname -> bool) ->
  (int -> int) -> XML.attrib list -> XML.attrib list
val map_string_attrib : 
  (XML.aname -> bool) ->
  (string -> string) -> XML.attrib list -> XML.attrib list
val map_string_attrib_in_list : 
  (XML.aname -> bool) ->
  (string -> string) -> XML.attrib list -> XML.attrib list


Exporting the following by higher level libraries would drive a hole through a type system, because they allow to add any attribute to any element.

val add_int_attrib : XML.aname -> int -> XML.attrib list -> XML.attrib list
val add_string_attrib : 
  XML.aname -> string -> XML.attrib list -> XML.attrib list
val add_comma_sep_attrib : 
  XML.aname -> string -> XML.attrib list -> XML.attrib list
val add_space_sep_attrib : 
  XML.aname -> string -> XML.attrib list -> XML.attrib list
val fold : 
  (unit -> 'a) ->
  (string -> 'a) ->
  (string -> 'a) ->
  (string -> 'a) ->
  (string -> 'a) ->
  (XML.ename -> XML.attrib list -> 'a) ->
  (XML.ename -> XML.attrib list -> 'a list -> 'a) -> XML.elt -> 'a
val all_entities : XML.elt -> string list
val translate : 
  (XML.ename -> XML.attrib list -> XML.elt) ->
  (XML.ename -> XML.attrib list -> XML.elt list -> XML.elt) ->
  ('a -> XML.ename -> XML.attrib list -> XML.elt list) ->
  ('a -> XML.ename -> XML.attrib list -> XML.elt list -> XML.elt list) ->
  (XML.ename -> XML.attrib list -> 'a -> 'a) -> 'a -> XML.elt -> XML.elt