From a722972c23b670aab14255d80e933b1fb1469fdb Mon Sep 17 00:00:00 2001 From: Stefano Zacchiroli Date: Mon, 2 Dec 2002 15:28:12 +0000 Subject: [PATCH] - moved supported_properties stuff in uwobo_common - removed dump_args debugging function --- helm/uwobo/src/ocaml/uwobo_engine.ml | 42 +--------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/helm/uwobo/src/ocaml/uwobo_engine.ml b/helm/uwobo/src/ocaml/uwobo_engine.ml index fcbc0f364..75e4669bf 100644 --- a/helm/uwobo/src/ocaml/uwobo_engine.ml +++ b/helm/uwobo/src/ocaml/uwobo_engine.ml @@ -29,48 +29,9 @@ open Uwobo_common;; exception Unsupported_property of string;; -let supported_properties = [ - "cdata-section-elements"; - "doctype-public"; - "doctype-system"; - "encoding"; - "indent"; - "media-type"; - "method"; - "omit-xml-declaration"; - "standalone"; - "version" -] - -let dump_args keys params props = - (sprintf " -Keys: %s
-Parameters:
-%s -Props: %s
-" - (String.concat ", " keys) - (String.concat - "
\n" - (List.map - (fun key -> - (sprintf - "Key: %s, Params: %s" - key - (String.concat - ", " - (List.map - (fun (key,value) -> sprintf "%s:%s" key value) - (params key))))) - keys)) - (String.concat - ", " - (List.map (fun (key,value) -> sprintf "%s:%s" key value) props))) - let xslNS = Gdome.domString "http://www.w3.org/1999/XSL/Transform" let outputS = Gdome.domString "output" let q_outputS = Gdome.domString "xsl:output" -let is_supported_property name = List.mem name supported_properties (** set a list of output properties in an xslt stylesheet, return a copy of the given stylesheet modified as needed, given stylesheet wont be changed by @@ -91,7 +52,7 @@ let apply_properties logger last_stylesheet props = | Some node -> new Gdome.element_of_node node) in let apply_property (name, value) = - if is_supported_property name then begin + if Uwobo_common.is_supported_property name then begin logger#log `Debug (sprintf "Setting property: %s = %s" name value); output_element#setAttribute (Gdome.domString name) @@ -124,7 +85,6 @@ let apply ~keys ~params ~props ~input = (* "p_" prefix means "processed" *) let (p_stylesheets, last_stylesheet) = styles#get keys in - logger#log `Debug (dump_args keys params props); logger#log `Debug "Creating input document ..."; let result = (* Gdome.document *) List.fold_left -- 2.39.2