X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fuwobo%2Fuwobo_engine.ml;h=03a3b424d726f1c65faa2693529fc06b9415dd41;hb=b5eca1fff4476831847825aa46ce149924d1c8c0;hp=f8be17806310755f6c5b4f1ba4ea2f9be976f411;hpb=fee0de0784e725071b9d0742c139c19845f83713;p=helm.git diff --git a/helm/uwobo/uwobo_engine.ml b/helm/uwobo/uwobo_engine.ml index f8be17806..03a3b424d 100644 --- a/helm/uwobo/uwobo_engine.ml +++ b/helm/uwobo/uwobo_engine.ml @@ -208,7 +208,23 @@ let apply logger#log `Debug (sprintf "Applying stylesheet %s ..." key); try let params = - List.map (fun (key,value) -> (key, "'" ^ value ^ "'")) (params key) + 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) in logger#log `Debug (sprintf "Gdome_xslt.applyStylesheet params=%s"