X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic%2FcicParser.ml;h=7cabeb6ae16413f6ac108b15b54f109b0ad8c755;hb=6f6b8f33397548319fef9b374f9e9017e7fa151d;hp=f0d3e800fe11f84a44944119866c8374c393e142;hpb=ae326f646ef4c01b43d6da04201b427d1e175400;p=helm.git diff --git a/helm/ocaml/cic/cicParser.ml b/helm/ocaml/cic/cicParser.ml index f0d3e800f..7cabeb6ae 100644 --- a/helm/ocaml/cic/cicParser.ml +++ b/helm/ocaml/cic/cicParser.ml @@ -46,7 +46,7 @@ class warner = end ;; -exception EmptyUri;; +exception EmptyUri of string;; (* given an uri u it returns the list of tokens of the base uri of u *) (* e.g.: token_of_uri "cic:/a/b/c/d.xml" returns ["a" ; "b" ; "c"] *) @@ -54,7 +54,8 @@ let tokens_of_uri uri = let uri' = UriManager.string_of_uri uri in let rec chop_list = function - [] -> raise EmptyUri + [] -> raise (EmptyUri uri') + | [fn] -> [] | he::[fn] -> [he] | he::tl -> he::(chop_list tl) in @@ -76,7 +77,9 @@ let annobj_of_xml filename uri = Y.parse_document_entity config (*PXP (Y.ExtID (Pxp_types.System filename, new Pxp_reader.resolve_as_file ~url_of_id ())) -*) (PxpUriResolver.from_file filename) +*) +(* (PxpUriResolver.from_file filename) *) + (Y.from_file ~alt:[PxpUrlResolver.url_resolver] filename) CicParser3.domspec in CicParser2.get_term d#root