1.1 --- a/examples/Common/Configurator/__init__.py Tue Jan 25 17:00:34 2005 +0000
1.2 +++ b/examples/Common/Configurator/__init__.py Tue Jan 25 17:00:47 2005 +0000
1.3 @@ -64,6 +64,28 @@
1.4 fields = XSLForms.Fields.Fields(encoding=self.encoding, values_are_lists=1)
1.5 parameters = trans.get_fields_from_body(self.encoding)
1.6 documents = fields.make_documents(parameters.items())
1.7 + elif method == "PROPFIND":
1.8 + dav_xsl = os.path.join(self.resource_dir, "config_dav.xsl")
1.9 + database_xml = os.path.join(self.resource_dir, "config_database.xml")
1.10 + database = libxml2dom.parse(database_xml)
1.11 +
1.12 + # Process the path.
1.13 +
1.14 + parts = trans.get_path_info().split("/")
1.15 + if not parts[-1]:
1.16 + del parts[-1]
1.17 +
1.18 + start = parts[-1]
1.19 + path = "/".join(parts)
1.20 + proc = XSLOutput.Processor([dav_xsl], parameters={
1.21 + "path" : path,
1.22 + "start" : start
1.23 + })
1.24 +
1.25 + trans.set_response_code(207)
1.26 + proc.send_output(trans.get_response_stream(), trans.get_response_stream_encoding(),
1.27 + database)
1.28 + raise WebStack.Generic.EndOfResponse
1.29 else:
1.30 trans.set_response_code(405)
1.31 raise WebStack.Generic.EndOfResponse
1.32 @@ -101,7 +123,7 @@
1.33
1.34 database_xsl = os.path.join(self.resource_dir, "config_database.xsl")
1.35 database_xml = os.path.join(self.resource_dir, "config_database.xml")
1.36 - proc = XSLOutput.Processor([database_xsl], {"database" : database_xml})
1.37 + proc = XSLOutput.Processor([database_xsl], references={"database" : database_xml})
1.38 configuration = proc.get_result(configuration)
1.39
1.40 # Start the response.