# HG changeset patch # User paulb # Date 1121878938 0 # Node ID fce8d5e7a1f4052f57b26cce9169e4c38912f1c9 # Parent 636bc557bc6c595d77337b855876704433f9c630 [project @ 2005-07-20 17:02:18 by paulb] Employed convenience methods for transformations along with extra class attributes. diff -r 636bc557bc6c -r fce8d5e7a1f4 examples/Common/VerySimple/__init__.py --- a/examples/Common/VerySimple/__init__.py Wed Jul 20 17:02:07 2005 +0000 +++ b/examples/Common/VerySimple/__init__.py Wed Jul 20 17:02:18 2005 +0000 @@ -5,7 +5,6 @@ import WebStack.Generic import XSLForms.Resources import XSLForms.Utils -import XSLOutput import os # Resource classes. @@ -19,6 +18,12 @@ template_resources = { "structure" : ("structure_template.xhtml", "structure_output.xsl") } + transform_resources = { + "types" : ["structure_types.xsl"] + } + document_resources = { + "types" : "structure_types.xml" + } def respond_to_form(self, trans, form): @@ -46,10 +51,9 @@ # Transform, adding enumerations/ranges. - types_xsl = os.path.join(self.resource_dir, "structure_types.xsl") - types_xml = os.path.join(self.resource_dir, "structure_types.xml") - proc = XSLOutput.Processor([types_xsl], references={"types" : types_xml}) - structure = proc.get_result(structure) + types_xsl_list = self.prepare_transform("types") + types_xml = self.prepare_document("types") + structure = self.get_result(types_xsl_list, structure, references={"types" : types_xml}) # Start the response.