Index: mod_dav_svn.c =================================================================== --- mod_dav_svn.c (revision 9636) +++ mod_dav_svn.c (working copy) @@ -48,6 +48,7 @@ const char *fs_path; /* path to the SVN FS */ const char *repo_name; /* repository name */ const char *xslt_uri; /* XSL transform URI */ + const char *xslt_filter; /* XSL Output Filter Name */ const char *fs_parent_path; /* path to parent of SVN FS'es */ svn_boolean_t autoversioning; /* whether autoversioning is active */ } dav_svn_dir_conf; @@ -104,6 +105,7 @@ newconf->fs_path = INHERIT_VALUE(parent, child, fs_path); newconf->repo_name = INHERIT_VALUE(parent, child, repo_name); newconf->xslt_uri = INHERIT_VALUE(parent, child, xslt_uri); + newconf->xslt_filter = INHERIT_VALUE(parent, child, xslt_filter); newconf->fs_parent_path = INHERIT_VALUE(parent, child, fs_parent_path); newconf->autoversioning = INHERIT_VALUE(parent, child, autoversioning); @@ -130,6 +132,16 @@ return NULL; } +static const char *dav_svn_xslt_filter(cmd_parms *cmd, void *config, + const char *arg1) +{ + dav_svn_dir_conf *conf = config; + + conf->xslt_filter = apr_pstrdup(cmd->pool, arg1); + + return NULL; +} + static const char *dav_svn_autoversioning_cmd(cmd_parms *cmd, void *config, int arg) { @@ -239,6 +251,14 @@ return conf->xslt_uri; } +const char *dav_svn_get_xslt_filter(request_rec *r) +{ + dav_svn_dir_conf *conf; + + conf = ap_get_module_config(r->per_dir_config, &dav_svn_module); + return conf->xslt_filter; +} + const char *dav_svn_get_special_uri(request_rec *r) { dav_svn_server_conf *conf; @@ -281,6 +301,11 @@ "directory indexes"), /* per directory/location */ + AP_INIT_TAKE1("SVNIndexXSLTFilter", dav_svn_xslt_filter, NULL, ACCESS_CONF, + "specify the XSLT Filter name to process the XSL for " + "directory indexes"), + + /* per directory/location */ AP_INIT_TAKE1("SVNParentPath", dav_svn_parent_path_cmd, NULL, ACCESS_CONF, "specifies the location in the filesystem whose " "subdirectories are assumed to be Subversion repositories."), Index: dav_svn.h =================================================================== --- dav_svn.h (revision 9636) +++ dav_svn.h (working copy) @@ -88,6 +88,9 @@ /* The URI of the XSL transform for directory indexes */ const char *xslt_uri; + /* The XSLT Filter Name of the XSL transform for directory indexes */ + const char *xslt_filter; + /* Whether autoversioning is active for this repository. */ svn_boolean_t autoversioning; @@ -297,6 +300,9 @@ /* Return the URI of an XSL transform stylesheet */ const char *dav_svn_get_xslt_uri(request_rec *r); +/* Return the XSLT Filter name */ +const char *dav_svn_get_xslt_filter(request_rec *r); + /* Convert an svn_error_t into a dav_error, pushing another error based on MESSAGE if MESSAGE is not NULL. Use the provided HTTP status for the DAV errors. Allocate new DAV errors from POOL. Index: repos.c =================================================================== --- repos.c (revision 9636) +++ repos.c (working copy) @@ -1122,6 +1122,7 @@ const char *fs_path; const char *repo_name; const char *xslt_uri; + const char *xslt_filter; const char *fs_parent_path; dav_resource_combined *comb; dav_svn_repos *repos; @@ -1137,6 +1138,7 @@ repo_name = dav_svn_get_repo_name(r); xslt_uri = dav_svn_get_xslt_uri(r); + xslt_filter = dav_svn_get_xslt_filter(r); /* This does all the work of interpreting/splitting the request uri. */ err = dav_svn_split_uri (r, r->uri, root_path, @@ -1228,6 +1230,9 @@ /* An XSL transformation */ repos->xslt_uri = xslt_uri; + /* An XSLT Output Filter */ + repos->xslt_filter = xslt_filter; + /* Is autoversioning active in this repos? */ repos->autoversioning = dav_svn_get_autoversioning_flag(r); @@ -2033,6 +2038,10 @@ const char *name = resource->info->repos->repo_name; const char *href = resource->info->repos_path; + if (resource->info->repos->xslt_filter) { + output = ap_add_output_filter(resource->info->repos->xslt_filter, NULL, output->r, output->r->connection); + } + ap_fputs(output, bb, "\n"); ap_fprintf(output, bb, "\n",