1.1 --- a/examples/Common/Configurator/__init__.py Sun Oct 09 00:47:47 2005 +0000
1.2 +++ b/examples/Common/Configurator/__init__.py Sun Oct 09 00:48:16 2005 +0000
1.3 @@ -5,7 +5,6 @@
1.4 import WebStack.Generic
1.5 import XSLForms.Utils
1.6 import XSLForms.Resources
1.7 -from XSLTools import XSLOutput
1.8 import os
1.9
1.10 # Site map imports.
1.11 @@ -91,46 +90,42 @@
1.12 # Transform, adding enumerations/ranges.
1.13
1.14 init_xsl = self.prepare_initialiser("configuration")
1.15 - proc = XSLOutput.Processor([init_xsl], references={
1.16 - "accessories" : self.prepare_document("accessories"),
1.17 - "base-system" : self.prepare_document("base-system"),
1.18 - "cpu" : self.prepare_document("cpu"),
1.19 - "hard-disk" : self.prepare_document("hard-disk"),
1.20 - "keyboard" : self.prepare_document("keyboard"),
1.21 - "memory-unit" : self.prepare_document("memory-unit"),
1.22 - "mouse" : self.prepare_document("mouse"),
1.23 - "screen" : self.prepare_document("screen"),
1.24 - "storage-unit" : self.prepare_document("storage-unit")
1.25 + configuration = self.get_result([init_xsl], configuration,
1.26 + references={
1.27 + "accessories" : self.prepare_document("accessories"),
1.28 + "base-system" : self.prepare_document("base-system"),
1.29 + "cpu" : self.prepare_document("cpu"),
1.30 + "hard-disk" : self.prepare_document("hard-disk"),
1.31 + "keyboard" : self.prepare_document("keyboard"),
1.32 + "memory-unit" : self.prepare_document("memory-unit"),
1.33 + "mouse" : self.prepare_document("mouse"),
1.34 + "screen" : self.prepare_document("screen"),
1.35 + "storage-unit" : self.prepare_document("storage-unit")
1.36 })
1.37 - configuration = proc.get_result(configuration)
1.38
1.39 # Filter out inappropriate choices.
1.40
1.41 filter_xsl_list = self.prepare_transform("filter")
1.42 - proc = XSLOutput.Processor(filter_xsl_list)
1.43 - configuration = proc.get_result(configuration)
1.44 + configuration = self.get_result(filter_xsl_list, configuration)
1.45
1.46 # Start the response.
1.47
1.48 trans.set_content_type(WebStack.Generic.ContentType("application/xhtml+xml", self.encoding))
1.49
1.50 - # Define the stylesheet parameters.
1.51 -
1.52 - stylesheet_parameters = {}
1.53 -
1.54 # Ensure that an output stylesheet exists.
1.55
1.56 if in_page_resource in self.in_page_resources.keys():
1.57 trans_xsl = self.prepare_fragment("configuration", in_page_resource)
1.58 - element_path = parameters.get("element-path", [""])[0]
1.59 - stylesheet_parameters["element-path"] = element_path
1.60 + stylesheet_parameters = self.prepare_parameters(parameters)
1.61 else:
1.62 trans_xsl = self.prepare_output("configuration")
1.63 + stylesheet_parameters = {}
1.64
1.65 # Complete the response.
1.66
1.67 self.send_output(trans, [trans_xsl], configuration, stylesheet_parameters)
1.68
1.69 + #from XSLTools import XSLOutput
1.70 #import sys
1.71 #proc = XSLOutput.Processor([trans_xsl], parameters=stylesheet_parameters)
1.72 #proc.send_output(sys.stderr, "iso-8859-1", configuration)