1.1 --- a/examples/Common/VerySimple/__init__.py Wed Jul 20 17:02:07 2005 +0000
1.2 +++ b/examples/Common/VerySimple/__init__.py Wed Jul 20 17:02:18 2005 +0000
1.3 @@ -5,7 +5,6 @@
1.4 import WebStack.Generic
1.5 import XSLForms.Resources
1.6 import XSLForms.Utils
1.7 -import XSLOutput
1.8 import os
1.9
1.10 # Resource classes.
1.11 @@ -19,6 +18,12 @@
1.12 template_resources = {
1.13 "structure" : ("structure_template.xhtml", "structure_output.xsl")
1.14 }
1.15 + transform_resources = {
1.16 + "types" : ["structure_types.xsl"]
1.17 + }
1.18 + document_resources = {
1.19 + "types" : "structure_types.xml"
1.20 + }
1.21
1.22 def respond_to_form(self, trans, form):
1.23
1.24 @@ -46,10 +51,9 @@
1.25
1.26 # Transform, adding enumerations/ranges.
1.27
1.28 - types_xsl = os.path.join(self.resource_dir, "structure_types.xsl")
1.29 - types_xml = os.path.join(self.resource_dir, "structure_types.xml")
1.30 - proc = XSLOutput.Processor([types_xsl], references={"types" : types_xml})
1.31 - structure = proc.get_result(structure)
1.32 + types_xsl_list = self.prepare_transform("types")
1.33 + types_xml = self.prepare_document("types")
1.34 + structure = self.get_result(types_xsl_list, structure, references={"types" : types_xml})
1.35
1.36 # Start the response.
1.37