1.1 --- a/examples/Common/Configurator/__init__.py Sat Mar 04 18:53:12 2006 +0000
1.2 +++ b/examples/Common/Configurator/__init__.py Sat Mar 04 18:53:32 2006 +0000
1.3 @@ -42,10 +42,10 @@
1.4 "translations" : "translations.xml"
1.5 }
1.6 in_page_resources = {
1.7 - "cpu" : ("config_output_cpu.xsl", "cpu-node"),
1.8 - "memory" : ("config_output_memory.xsl", "memory-node"),
1.9 - "hard-disks" : ("config_output_harddisks.xsl", "hard-disks-node"),
1.10 - "accessories" : ("config_output_accessories.xsl", "accessories-node")
1.11 + "cpu" : ("configuration", "config_output_cpu.xsl", "cpu-node"),
1.12 + "memory" : ("configuration", "config_output_memory.xsl", "memory-node"),
1.13 + "hard-disks" : ("configuration", "config_output_harddisks.xsl", "hard-disks-node"),
1.14 + "accessories" : ("configuration", "config_output_accessories.xsl", "accessories-node")
1.15 }
1.16
1.17 def respond_to_form(self, trans, form):
1.18 @@ -119,7 +119,7 @@
1.19 # Ensure that an output stylesheet exists.
1.20
1.21 if in_page_resource in self.in_page_resources.keys():
1.22 - trans_xsl = self.prepare_fragment("configuration", in_page_resource)
1.23 + trans_xsl = self.prepare_fragment(in_page_resource)
1.24 stylesheet_parameters = self.prepare_parameters(parameters)
1.25 else:
1.26 trans_xsl = self.prepare_output("configuration")
1.27 @@ -168,4 +168,10 @@
1.28
1.29 return resource
1.30
1.31 +# Resource preparation ahead of time - useful for making installations.
1.32 +
1.33 +def prepare_resources():
1.34 + for cls in [ConfiguratorResource]:
1.35 + XSLForms.Resources.WebResources.prepare_resources(cls)
1.36 +
1.37 # vim: tabstop=4 expandtab shiftwidth=4
2.1 --- a/examples/Common/Dictionary/__init__.py Sat Mar 04 18:53:12 2006 +0000
2.2 +++ b/examples/Common/Dictionary/__init__.py Sat Mar 04 18:53:32 2006 +0000
2.3 @@ -24,8 +24,8 @@
2.4 "words" : ("words_template.xhtml", "words_output.xsl")
2.5 }
2.6 in_page_resources = {
2.7 - "matches" : ("words_output_entry.xsl", "matches-node"),
2.8 - #"word" : ("words_output_word.xsl", "word-node")
2.9 + "matches" : ("words", "words_output_entry.xsl", "matches-node"),
2.10 + #"word" : ("words", "words_output_word.xsl", "word-node")
2.11 }
2.12
2.13 def __init__(self, dict):
2.14 @@ -116,7 +116,7 @@
2.15 # Ensure that an output stylesheet exists.
2.16
2.17 if in_page_resource in self.in_page_resources.keys():
2.18 - trans_xsl = self.prepare_fragment("words", in_page_resource)
2.19 + trans_xsl = self.prepare_fragment(in_page_resource)
2.20 stylesheet_parameters = self.prepare_parameters(parameters)
2.21 else:
2.22 trans_xsl = self.prepare_output("words")
2.23 @@ -156,4 +156,10 @@
2.24
2.25 return resource
2.26
2.27 +# Resource preparation ahead of time - useful for making installations.
2.28 +
2.29 +def prepare_resources():
2.30 + for cls in [DictionaryResource]:
2.31 + XSLForms.Resources.WebResources.prepare_resources(cls)
2.32 +
2.33 # vim: tabstop=4 expandtab shiftwidth=4
3.1 --- a/examples/Common/PEP241/__init__.py Sat Mar 04 18:53:12 2006 +0000
3.2 +++ b/examples/Common/PEP241/__init__.py Sat Mar 04 18:53:32 2006 +0000
3.3 @@ -30,11 +30,11 @@
3.4 "categories" : "pep241_categories.xml"
3.5 }
3.6 in_page_resources = {
3.7 - "platforms" : ("pep241_output_platforms.xsl", "platforms"),
3.8 - "supported-platforms" : ("pep241_output_supported_platforms.xsl", "supported-platforms"),
3.9 - "keywords" : ("pep241_output_keywords.xsl", "keywords"),
3.10 - "authors" : ("pep241_output_authors.xsl", "authors"),
3.11 - "dependencies" : ("pep241_output_dependencies.xsl", "dependencies")
3.12 + "platforms" : ("pep241", "pep241_output_platforms.xsl", "platforms"),
3.13 + "supported-platforms" : ("pep241", "pep241_output_supported_platforms.xsl", "supported-platforms"),
3.14 + "keywords" : ("pep241", "pep241_output_keywords.xsl", "keywords"),
3.15 + "authors" : ("pep241", "pep241_output_authors.xsl", "authors"),
3.16 + "dependencies" : ("pep241", "pep241_output_dependencies.xsl", "dependencies")
3.17 }
3.18
3.19 def respond_to_form(self, trans, form):
3.20 @@ -94,7 +94,7 @@
3.21 # Ensure that an output stylesheet exists.
3.22
3.23 if in_page_resource in self.in_page_resources.keys():
3.24 - trans_xsl = self.prepare_fragment("pep241", in_page_resource)
3.25 + trans_xsl = self.prepare_fragment(in_page_resource)
3.26 stylesheet_parameters = self.prepare_parameters(parameters)
3.27 else:
3.28 trans_xsl = self.prepare_output("pep241")
3.29 @@ -138,4 +138,10 @@
3.30
3.31 return resource
3.32
3.33 +# Resource preparation ahead of time - useful for making installations.
3.34 +
3.35 +def prepare_resources():
3.36 + for cls in [PEP241Resource]:
3.37 + XSLForms.Resources.WebResources.prepare_resources(cls)
3.38 +
3.39 # vim: tabstop=4 expandtab shiftwidth=4
4.1 --- a/examples/Common/Questionnaire/__init__.py Sat Mar 04 18:53:12 2006 +0000
4.2 +++ b/examples/Common/Questionnaire/__init__.py Sat Mar 04 18:53:32 2006 +0000
4.3 @@ -100,4 +100,10 @@
4.4
4.5 return resource
4.6
4.7 +# Resource preparation ahead of time - useful for making installations.
4.8 +
4.9 +def prepare_resources():
4.10 + for cls in [QuestionnaireEditorResource]:
4.11 + XSLForms.Resources.WebResources.prepare_resources(cls)
4.12 +
4.13 # vim: tabstop=4 expandtab shiftwidth=4
5.1 --- a/examples/Common/Recursive/__init__.py Sat Mar 04 18:53:12 2006 +0000
5.2 +++ b/examples/Common/Recursive/__init__.py Sat Mar 04 18:53:32 2006 +0000
5.3 @@ -75,4 +75,10 @@
5.4
5.5 return RecursiveResource()
5.6
5.7 +# Resource preparation ahead of time - useful for making installations.
5.8 +
5.9 +def prepare_resources():
5.10 + for cls in [RecursiveResource]:
5.11 + XSLForms.Resources.WebResources.prepare_resources(cls)
5.12 +
5.13 # vim: tabstop=4 expandtab shiftwidth=4
6.1 --- a/examples/Common/VerySimple/__init__.py Sat Mar 04 18:53:12 2006 +0000
6.2 +++ b/examples/Common/VerySimple/__init__.py Sat Mar 04 18:53:32 2006 +0000
6.3 @@ -39,7 +39,7 @@
6.4 "translations" : "translations.xml"
6.5 }
6.6 in_page_resources = {
6.7 - "comments" : ("structure_output_comments.xsl", "comment-node")
6.8 + "comments" : ("structure", "structure_output_comments.xsl", "comment-node")
6.9 }
6.10
6.11 def respond_to_form(self, trans, form):
6.12 @@ -86,7 +86,7 @@
6.13 # Ensure that an output stylesheet exists.
6.14
6.15 if in_page_resource in self.in_page_resources.keys():
6.16 - trans_xsl = self.prepare_fragment("structure", in_page_resource)
6.17 + trans_xsl = self.prepare_fragment(in_page_resource)
6.18 stylesheet_parameters = self.prepare_parameters(parameters)
6.19 else:
6.20 trans_xsl = self.prepare_output("structure")
6.21 @@ -123,4 +123,10 @@
6.22
6.23 return resource
6.24
6.25 +# Resource preparation ahead of time - useful for making installations.
6.26 +
6.27 +def prepare_resources():
6.28 + for cls in [VerySimpleResource]:
6.29 + XSLForms.Resources.WebResources.prepare_resources(cls)
6.30 +
6.31 # vim: tabstop=4 expandtab shiftwidth=4