From 3fd8583f198e7e09995c3a65b5f05a853c8d1646 Mon Sep 17 00:00:00 2001
From: Claudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Date: Tue, 18 May 2004 09:16:31 +0000
Subject: [PATCH] xml:base and helm:base are now generated only for theories.

---
 helm/ocaml/getter/http_getter_cache.ml   | 15 ++++++++++-----
 helm/ocaml/getter/http_getter_common.mli |  1 +
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/helm/ocaml/getter/http_getter_cache.ml b/helm/ocaml/getter/http_getter_cache.ml
index 5b0e66832..144b9ac5f 100644
--- a/helm/ocaml/getter/http_getter_cache.ml
+++ b/helm/ocaml/getter/http_getter_cache.ml
@@ -101,11 +101,16 @@ let respond_xml
           (Lazy.force Http_getter_env.rdf_dir) escaped_prefix baseuri extension
   in
   let patch_fun =
-    if patch then
-      Http_getter_common.patch_xml
-       ~xmlbases:(Filename.dirname uri, Filename.dirname url) ~via_http ()
-    else
-      (fun x -> x)
+    let xmlbases =
+     if Http_getter_common.is_theory_uri uri then
+      Some (Filename.dirname uri, Filename.dirname url)
+     else
+      None
+    in
+     if patch then
+       Http_getter_common.patch_xml ?xmlbases ~via_http ()
+     else
+       (fun x -> x)
   in
   let basename = Pcre.replace ~pat:"\\.gz$" downloadname in
   let contype = "text/xml" in
diff --git a/helm/ocaml/getter/http_getter_common.mli b/helm/ocaml/getter/http_getter_common.mli
index f626f4ab0..0aec9bc18 100644
--- a/helm/ocaml/getter/http_getter_common.mli
+++ b/helm/ocaml/getter/http_getter_common.mli
@@ -32,6 +32,7 @@ val string_of_ls_flag: ls_flag -> string
 val string_of_encoding: encoding -> string
 
 val is_cic_uri: string -> bool
+val is_theory_uri: string -> bool
 val is_nuprl_uri: string -> bool
 val is_rdf_uri: string -> bool
 val is_xsl_uri: string -> bool
-- 
2.39.2