X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fuwobo%2Fsrc%2Focaml%2Fuwobo_styles.ml;h=b402987800bb6c51940197f1aa713c70ec4af015;hb=de72c4ad2f799cfb2a2e23fadc14235a6e1c76e8;hp=93fdb8e6330263c9d45618da314bf10dab63caf5;hpb=beaf9a3cb95519e68e5806ac2f8a45b480d8e5ac;p=helm.git diff --git a/helm/uwobo/src/ocaml/uwobo_styles.ml b/helm/uwobo/src/ocaml/uwobo_styles.ml index 93fdb8e63..b40298780 100644 --- a/helm/uwobo/src/ocaml/uwobo_styles.ml +++ b/helm/uwobo/src/ocaml/uwobo_styles.ml @@ -40,16 +40,26 @@ class styles = val domImpl = Gdome.domImplementation () (** process an XSLT stylesheet *) - method private process uri = - Gdome_xslt.processStylesheet (domImpl#createDocumentFromURI ~uri ()) + method private process uri = domImpl#createDocumentFromURI ~uri () method get keys = self#doReader (lazy ( - List.fold_left - (fun collected_styles key -> - (List.find (fun (k, _) -> k = key) stylesheets)::collected_styles) - [] - (List.rev keys) + let rev_keys = List.rev keys in + let last_key = List.hd rev_keys in + let p_stylesheets = + List.fold_left + (fun collected_styles key -> + let (key, stylesheet) = + List.find (fun (k, _) -> k = key) stylesheets + in + (key, Gdome_xslt.processStylesheet stylesheet)::collected_styles) + [] + rev_keys + in + let last_stylesheet = + snd (List.find (fun (k, _) -> k = last_key) stylesheets) + in + (p_stylesheets, last_stylesheet) )) method add key uri =