X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fhelena%2Fsrc%2Fxml%2FxmlLibrary.ml;h=584dc776a7b8d4a0d533c1b69a1ebce7e2f01414;hb=433d9c9612c1557e03a549e004c796c1137d4b4a;hp=1112f43240a62da00bdfc754fe5e0165ac2d7069;hpb=34e6104ef149e3776d0ab7f0930ae73f0e8de157;p=helm.git diff --git a/helm/software/helena/src/xml/xmlLibrary.ml b/helm/software/helena/src/xml/xmlLibrary.ml index 1112f4324..584dc776a 100644 --- a/helm/software/helena/src/xml/xmlLibrary.ml +++ b/helm/software/helena/src/xml/xmlLibrary.ml @@ -9,14 +9,14 @@ \ / This software is distributed as is, NO WARRANTY. V_______________________________________________________________ *) -module F = Filename +module KF = Filename -module U = NUri -module C = Cps -module G = Options -module H = Hierarchy -module N = Level -module E = Entity +module U = NUri +module C = Cps +module G = Options +module H = Hierarchy +module N = Layer +module E = Entity (* internal functions *******************************************************) @@ -24,21 +24,17 @@ let base = "xml" let ext = ".xml" -let obj_root = "ENTITY" - -let ccs_name = "ccs.ldc" - -let ccs_root = "CCS" +let obj_root = "CONSTANT" let home = "http://lambdadelta.info/" -let system = F.concat (F.concat home base) "ld.dtd" +let system = KF.concat (KF.concat home base) "ld.dtd" let xmlns = "xmlns", home let path_of_uri xdir uri = - let base = F.concat xdir base in - F.concat base (Str.string_after (U.string_of_uri uri) 3) + let base = KF.concat xdir base in + KF.concat base (Str.string_after (U.string_of_uri uri) 3) (* interface functions ******************************************************) @@ -101,15 +97,13 @@ let name a = E.name err f a let apix a = - let err () = "age", "" in - let f i = "age", string_of_int i in - E.apix err f a + "position", string_of_int a.E.n_apix -let level st n = - "level", N.to_string st n +let layer st n = + "layer", N.to_string st n -let degr a = - "degr", string_of_int a.E.n_degr +let kind a = + "position", string_of_int a.E.n_sort let meta a = let map = function @@ -128,7 +122,7 @@ let info a = let export_entity pp_term (ra, na, u, b) = let path = path_of_uri !G.xdir u in - let _ = Sys.command (Printf.sprintf "mkdir -p %s" (F.dirname path)) in + let _ = Sys.command (Printf.sprintf "mkdir -p %s" (KF.dirname path)) in let och = open_out (path ^ ext) in let out = output_string och in xml out "1.0" "UTF-8"; doctype out obj_root system;