From c63e8332bdded20ff61d47bd5951a80c29b41942 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Thu, 30 Jun 2005 09:39:28 +0000 Subject: [PATCH] buri_of_uri is now #xpointer aware. --- helm/ocaml/urimanager/uriManager.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/helm/ocaml/urimanager/uriManager.ml b/helm/ocaml/urimanager/uriManager.ml index 203093c7e..b8da7d91e 100644 --- a/helm/ocaml/urimanager/uriManager.ml +++ b/helm/ocaml/urimanager/uriManager.ml @@ -55,7 +55,10 @@ let name_of_uri (uri, _) = String.sub uri index1 (index2 - index1) let buri_of_uri (uri,_) = - let index = String.rindex uri '/' in + let xpointer_offset = + try String.rindex uri '#' with Not_found -> String.length uri - 1 + in + let index = String.rindex_from uri xpointer_offset '/' in String.sub uri 0 index module OrderedStrings = -- 2.39.2