+ List.map
+ (fun (key,value) ->
+ let quoted_value =
+ if String.contains value '\'' then
+ if String.contains value '"' then
+ raise
+ (Failure
+ ("A parameter value can not contain both single and " ^
+ "double quotes, since it must be a valid XPath string " ^
+ "literal"))
+ else
+ "\"" ^ value ^ "\""
+ else
+ "'" ^ value ^ "'"
+ in
+ (key,quoted_value)
+ ) (params key)