+
+(* implementazione manuale di tref_uref da controllare
+
+let split s =
+ try
+ let i = Str.search_forward (Str.regexp_string ":/") s 0 in
+ let p = Str.string_before s i in
+ let q = Str.string_after s (i + 2) in
+ (p, q)
+ with
+ Not_found -> (s, "")
+
+let encode = function
+ | Str.Text s -> MQBC s
+ | Str.Delim s ->
+ if s = "?" then MQBQ else
+ if s = "*" then MQBS else
+ if s = "**" then MQBSS else
+ if s = "/" then MQBD else MQBC s
+
+let tref_uref (u, i) =
+ let s = UriManager.string_of_uri u in
+ match split s with
+ | (p, q) ->
+ let rx = Str.regexp "\?\|\*\*\|\*\|/" in
+ let l = Str.full_split rx q in
+ (Some p, List.map encode l, i)
+
+*)