+let ind_uri_split ((s, _) as uri) =
+ let noxp = strip_xpointer uri in
+ try
+ (let arg_index = String.rindex s '(' in
+ try
+ (let ty_index = String.index_from s arg_index '/' in
+ try
+ (let k_index = String.index_from s (ty_index+1) '/' in
+ let tyno = int_of_string (String.sub s (ty_index + 1) (k_index - ty_index - 1)) in
+ let kno = int_of_string (String.sub s (k_index + 1) (String.length s - k_index - 2)) in
+ noxp, Some tyno, Some kno)
+ with Not_found ->
+ let tyno = int_of_string (String.sub s (ty_index + 1) (String.length s - ty_index - 2)) in
+ noxp, Some tyno, None)
+ with Not_found -> noxp, None, None
+ )
+ with Not_found -> noxp, None, None
+;;
+