X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fcic_acic%2Fcic2Xml.ml;h=eb3b93408255d76f677a48948b0aa44762e6e53a;hb=488f49d2ac60fa63e65a19ad8684414266e05ac6;hp=c90bc348c662c5c35dcdf3951946ee4de06ea53e;hpb=8402a4a856b031916b1e2b1354b863933763fa58;p=helm.git diff --git a/helm/software/components/cic_acic/cic2Xml.ml b/helm/software/components/cic_acic/cic2Xml.ml index c90bc348c..eb3b93408 100644 --- a/helm/software/components/cic_acic/cic2Xml.ml +++ b/helm/software/components/cic_acic/cic2Xml.ml @@ -267,7 +267,7 @@ let print_term ?ids_to_inner_sorts = aux ;; -let xml_of_attrs attributes = +let xml_of_attrs generate_attributes attributes = let class_of = function | `Coercion n -> Xml.xml_empty "class" [None,"value","coercion";None,"arity",string_of_int n] @@ -312,9 +312,10 @@ let xml_of_attrs attributes = List.fold_right (fun attr res -> [< xml_attr_of attr ; res >]) attributes [<>] in - Xml.xml_nempty "attributes" [] xml_attrs + if generate_attributes then Xml.xml_nempty "attributes" [] xml_attrs else [<>] -let print_object uri ?ids_to_inner_sorts ~ask_dtd_to_the_getter obj = +let print_object uri + ?ids_to_inner_sorts ?(generate_attributes=true) ~ask_dtd_to_the_getter obj = let module C = Cic in let module X = Xml in let module U = UriManager in @@ -322,7 +323,7 @@ let print_object uri ?ids_to_inner_sorts ~ask_dtd_to_the_getter obj = match obj with C.ACurrentProof (id,idbody,n,conjectures,bo,ty,params,obj_attrs) -> let params' = param_attribute_of_params params in - let xml_attrs = xml_of_attrs obj_attrs in + let xml_attrs = xml_of_attrs generate_attributes obj_attrs in let xml_for_current_proof_body = (*CSC: Should the CurrentProof also have the list of variables it depends on? *) (*CSC: I think so. Not implemented yet. *) @@ -382,7 +383,7 @@ let print_object uri ?ids_to_inner_sorts ~ask_dtd_to_the_getter obj = xmlty, Some xmlbo | C.AConstant (id,idbody,n,bo,ty,params,obj_attrs) -> let params' = param_attribute_of_params params in - let xml_attrs = xml_of_attrs obj_attrs in + let xml_attrs = xml_of_attrs generate_attributes obj_attrs in let xmlbo = match bo with None -> None @@ -409,7 +410,7 @@ let print_object uri ?ids_to_inner_sorts ~ask_dtd_to_the_getter obj = xmlty, xmlbo | C.AVariable (id,n,bo,ty,params,obj_attrs) -> let params' = param_attribute_of_params params in - let xml_attrs = xml_of_attrs obj_attrs in + let xml_attrs = xml_of_attrs generate_attributes obj_attrs in let xmlbo = match bo with None -> [< >] @@ -429,7 +430,7 @@ let print_object uri ?ids_to_inner_sorts ~ask_dtd_to_the_getter obj = aobj, None | C.AInductiveDefinition (id,tys,params,nparams,obj_attrs) -> let params' = param_attribute_of_params params in - let xml_attrs = xml_of_attrs obj_attrs in + let xml_attrs = xml_of_attrs generate_attributes obj_attrs in [< X.xml_cdata "\n" ; X.xml_cdata ("\n") ;