Commit 167685a2 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-11-21 12:51:15 by szach] changed rec_of_list* helpers so that they use Ns.qname instead of

string

Original author: szach
Date: 2003-11-21 12:51:15+00:00
parent 7737cffa
......@@ -1771,9 +1771,9 @@ let xml' tag attrs cont = xml (cons tag) (cons (times (cons attrs) (cons cont)))
let rec_of_list ?(opened=true) l =
let map =
List.fold_left
(fun acc (name,typ) ->
(fun acc (qname, typ) ->
LabelMap.union_disj acc
(LabelMap.singleton (LabelPool.mk (Ns.empty,Utf8.mk name)) (cons typ)))
(LabelMap.singleton (LabelPool.mk qname) (cons typ)))
LabelMap.empty
l
in
......@@ -1782,9 +1782,9 @@ let rec_of_list ?(opened=true) l =
let rec_of_list' ?(opened=true) l =
let map =
List.fold_left
(fun acc (opt,name,typ) ->
(fun acc (opt, qname, typ) ->
LabelMap.union_disj acc
(LabelMap.singleton (LabelPool.mk (Ns.empty,Utf8.mk name))
(LabelMap.singleton (LabelPool.mk qname)
(if opt then cons (Record.or_absent typ) else (cons typ))))
LabelMap.empty
l
......
......@@ -83,11 +83,11 @@ val xml': t -> t -> t -> t
(** Build a record from a list of <name,t> pairs. Open defaults to true.
All specified fields are required. *)
val rec_of_list: ?opened:bool -> (string * t) list -> t
val rec_of_list: ?opened:bool -> (Ns.qname * t) list -> t
(** Similiar to rec_of_list, the additional boolean value specify whether the
specified field is optional (true) or not (false. *)
val rec_of_list': ?opened:bool -> (bool * string * t) list -> t
val rec_of_list': ?opened:bool -> (bool * Ns.qname * t) list -> t
val empty_closed_record: t
val empty_opened_record: t
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment