Author: Steven Neiland

Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.

In a previous article on subversion I mentioned the use of the svnindex.xsl file to style the repository listing. This file was placed in the root of "" which was a level above the svn repositories.

However there may arise a situation such as outlined in last weeks posting where you need to host the xslt files from within a repository. Or you may just decide you want to simply because. Not only is this really simple to do, it allows us to version control the svnindex file itself.

Step 1: Create Repository

Lets create a dedicated repository for the svnindex xml and svnindex css files. I named my repo "svnstyling". Import the two files into the repo.

Step 2: Call SVNIndexXSLT

Next we set the svnindexxslt directive in the location section of our vhost and restart apache.

<VirtualHost *:80>

<Location />
DAV svn
SVNParentPath "C:/svn_repository/"
SVNListParentPath on
SVNIndexXSLT "/svnstyling/svnindex.xsl"


Step 3: Set the mime types

Because we are serving the xsl and css files directly from a subversion repository we need to define the mime types for each file. For the xsl file set the mimetype to "test/xml" and for the css file set the mimetype to "text/css".

$ svn propset svn:mime-type text/xml svnindex xml
$ svn propset svn:mime-type text/css svnindex css

That's it. Now our repositories have their own dedicated vhost while keeping their nice xslt styling and as a bonus the xsl and associated files are now themselves version controlled.

Related Blog Postings

What Do You Think?

Reader Comments

Post a Comment

Comment Etiquette:

  • Please keep comments on-topic.
  • Please do not post unrelated questions or large chunks of code.
  • Please do not engage in flaming/abusive behaviour.
  • Comments that contain or appear to be advertisments, will not be published.
  • Comments that appear to be created for the purpose of linkbuilding to commercial sites will be removed.

We are all adults here so play nice.


Archives Blog Listing

Tag Listing

Learn CF In A Week


Fork me on GitHub