ToHTML

The ToHTML tool is the most important part of this process. It is an XSLT file, and can be used to transform the XML into a web site.

Each viewer of the result has a identifier (usually the name of the character), which you use to specify what web site you wish to create. This is passed as the “target” parameter. If no “target” is specified, there will be no filtering done and the DM version will be created.

You can then upload the created web site to a web server and then let that specific player know the exact URL.

Parameters

XSL allows for parameters to be set. These are the parameters that ToHTML understands.

ParameterDescription
targetThe id for the viewer of the website to be created. If none is specified, the master version will be created.
skipIndexIf this is set to 1, then the index is not created. The index is the most processor intensive part of website creation, so if you are doing testing, you may want to use this to speed the process up.

When using xsltproc, these can be passed with the --stringparam argument.

Usage on Mac OS X

The easiest way to use ToHTML.xslt is to use the terminal command “xsltproc”.

A typical usage would be:

xsltproc --stringparam target Grad -o rpg/ ToHTML.xslt ErikWorld.xml

In this case, the target will be the id “Grad”. The -o is specifying that the results should be placed within the “rpg” directory. “ErikWorld.xml” is the name of the XML file that contains all of the campaign information.

You can then place the entire “rpg” directory on a web server, and it can be browsed.

There is no security to prevent anyone from looking at any site. So it is recommended that you create directories with strange names and then only tell the appropriate people about each directory. Security through obscurity.

For my own use, I have created a file titled “Create Files.command”, which is similar to the following content.

#!/bin/sh cd ${0%/*} xsltproc --stringparam target Grad -o rpg/ ToHTML.xslt ErikWorld.xml xsltproc -o Moria/ ToHTML.xslt ErikWorld.xml xsltproc --stringparam target Azreil -o Asimov/ ToHTML.xslt ErikWorld.xml xsltproc --stringparam target Maddwyn -o Maddox/ ToHTML.xslt ErikWorld.xml xsltproc --stringparam target Tara -o Terry/ ToHTML.xslt ErikWorld.xml

I placed the file next to the “ErikWorld.xml” and the “ToHTML.xslt”. I then ran the following terminal command on it:

chmod +x Create\ Files.command

I can then double-click on the file in the Finder, and it will go through and create five versions of my campaign. In the “rpg” folder is the generic campaign, not specific to any one player; it has the id “Grad”. In the “Moria” folder is all the knowledge of the campaign, unfiltered, so that I can access it when I’m away from my computer. In the “Asimov”, “Maddox”, and “Terry” directories are the websites for the characters “Azreil”, “Maddwyn”, and “Tara”, respectively. I then let each player know the address of their characters folder, and make it their responsibility to keep it secret.

And in case you are wondering, this is an example. I don’t actually use those folder names so you do not need to bother looking for them.