X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Furimanager%2FuriManager.ml;h=3028cf2b9b37e5d527bf35e6d89a07ed23ea7f72;hb=ac7687ce66526f905874ed99a845223c853c558a;hp=39d058b5e54c0f749a7606150f6ddfc004eb7d73;hpb=10be44e671c08f7673f6bbb00759639714841b75;p=helm.git diff --git a/helm/ocaml/urimanager/uriManager.ml b/helm/ocaml/urimanager/uriManager.ml index 39d058b5e..3028cf2b9 100644 --- a/helm/ocaml/urimanager/uriManager.ml +++ b/helm/ocaml/urimanager/uriManager.ml @@ -138,3 +138,14 @@ let innertypesuri_of_uri uri = newuri.(Array.length cicuri - 2) <- (string_of_uri cicuri) ^ ".types" ; newuri ;; + +type uriref = uri * (int list) + +let string_of_uriref (uri, fi) = + let str = string_of_uri uri in + let xp t = "#xpointer(1/" ^ string_of_int (t + 1) in + match fi with + | [] -> str + | [t] -> str ^ xp t ^ ")" + | t :: c :: _ -> str ^ xp t ^ "/" ^ string_of_int c ^ ")" +