]> matita.cs.unibo.it Git - helm.git/commitdiff
xml:base and helm:base are now generated only for theories.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 18 May 2004 09:16:31 +0000 (09:16 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 18 May 2004 09:16:31 +0000 (09:16 +0000)
helm/ocaml/getter/http_getter_cache.ml
helm/ocaml/getter/http_getter_common.mli

index 5b0e66832e021f1b6a600f33ae6c649622b2849b..144b9ac5f4c5ad99f9ebad8fb528a4977878a3f0 100644 (file)
@@ -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
index f626f4ab00ea822c4d3ed1a15c9eda7ebc2d6a76..0aec9bc1849d3b7b412abfe48ac0d4d842d89d6a 100644 (file)
@@ -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