# HG changeset patch # User paulb # Date 1130802951 0 # Node ID d24aa73692ee14a223e1259c2319f6ca868e4f1e # Parent d5323c740aab8297caf1251dccc91fd09338c6af [project @ 2005-10-31 23:55:42 by paulb] Added an option to suppress input stylesheet enumeration initialisation. diff -r d5323c740aab -r d24aa73692ee XSLForms/Resources/WebResources.py --- a/XSLForms/Resources/WebResources.py Mon Oct 31 23:55:38 2005 +0000 +++ b/XSLForms/Resources/WebResources.py Mon Oct 31 23:55:51 2005 +0000 @@ -197,11 +197,13 @@ expressions=stylesheet_expressions, references=references) return proc.get_result(document) - def prepare_initialiser(self, input_identifier): + def prepare_initialiser(self, input_identifier, init_enumerations=1): """ Prepare an initialiser/input transformation using the given - 'input_identifier'. + 'input_identifier'. The optional 'init_enumerations' (defaulting to + true) may be used to indicate whether enumerations are to be initialised + from external documents. Return the full path to the input stylesheet for use with 'send_output' or 'get_result'. @@ -210,7 +212,7 @@ template_filename, input_filename = self.init_resources[input_identifier] input_path = os.path.abspath(os.path.join(self.resource_dir, input_filename)) template_path = os.path.abspath(os.path.join(self.resource_dir, template_filename)) - XSLForms.Prepare.ensure_input_stylesheet(template_path, input_path) + XSLForms.Prepare.ensure_input_stylesheet(template_path, input_path, init_enumerations) return input_path def prepare_transform(self, transform_identifier): diff -r d5323c740aab -r d24aa73692ee XSLForms/XSL/Input.xsl --- a/XSLForms/XSL/Input.xsl Mon Oct 31 23:55:38 2005 +0000 +++ b/XSLForms/XSL/Input.xsl Mon Oct 31 23:55:51 2005 +0000 @@ -26,6 +26,10 @@ + yes + + + @@ -34,9 +38,11 @@ - - - + + + + + @@ -99,9 +105,12 @@ - - - + + + + + +