1.1 --- a/examples/Common/Dictionary/__init__.py Sat Mar 04 18:53:12 2006 +0000
1.2 +++ b/examples/Common/Dictionary/__init__.py Sat Mar 04 18:53:32 2006 +0000
1.3 @@ -24,8 +24,8 @@
1.4 "words" : ("words_template.xhtml", "words_output.xsl")
1.5 }
1.6 in_page_resources = {
1.7 - "matches" : ("words_output_entry.xsl", "matches-node"),
1.8 - #"word" : ("words_output_word.xsl", "word-node")
1.9 + "matches" : ("words", "words_output_entry.xsl", "matches-node"),
1.10 + #"word" : ("words", "words_output_word.xsl", "word-node")
1.11 }
1.12
1.13 def __init__(self, dict):
1.14 @@ -116,7 +116,7 @@
1.15 # Ensure that an output stylesheet exists.
1.16
1.17 if in_page_resource in self.in_page_resources.keys():
1.18 - trans_xsl = self.prepare_fragment("words", in_page_resource)
1.19 + trans_xsl = self.prepare_fragment(in_page_resource)
1.20 stylesheet_parameters = self.prepare_parameters(parameters)
1.21 else:
1.22 trans_xsl = self.prepare_output("words")
1.23 @@ -156,4 +156,10 @@
1.24
1.25 return resource
1.26
1.27 +# Resource preparation ahead of time - useful for making installations.
1.28 +
1.29 +def prepare_resources():
1.30 + for cls in [DictionaryResource]:
1.31 + XSLForms.Resources.WebResources.prepare_resources(cls)
1.32 +
1.33 # vim: tabstop=4 expandtab shiftwidth=4