This is the README file for the TrailTimes utility

1. What is it TrailTimes?
2. Licensing
3. Warranty
4. Requirements
5. Installation
6. How it works
7. Usage
8. Printing
9. Customization
10. Creating a stand-alone HTML file


1. What is Trailtimes?
========================================

Trailtimes is a windows utility that helps Motorcycle Enduro Organisers
quickly produce a simple report showing the section times for the days
event.

It is a low-tech solution to a simple problem. Anyone looking for 18 buttons,
thirteen menus, and interactive help should look somewhere else.

If you've never used a computer in your life then you may find it a little
confusing at first but 5 minutes playing should see you pretty well sorted.
     
Original creator of TrailTimes is The Silver-Bullet Co Ltd 
(www.silver-bullet.co.nz).


2. Licensing
========================================

TrailTimes is Freeware. Use and share as much as you like.

If I ever get around to prettying up the source code I will Open Source it.

It incorporates the TinyXml library
   http:\\www.sourceforge.net\projects\tinyxml

TinyXml is a great little library that is exactly what was needed. Any bugs 
in TrailTime are my own creation and are very unlikely to be the fault of 
TinyXml.


3. Warranty
========================================

There is NO WARRANTY for using TrailTimes in any conditions.


4. Requirements
========================================

TrailTimes is a tiny program, written with VC6 on a Windows XP machine

I know it works on XP. It should work on Vista. 
It may well work on Win98.

It needs a browser capable of loading an XSLT linked XML file.

I tested it on Firefox 3
http://www.mozilla-europe.org/en/firefox/

It probably works with IE7 as well but, as I am allergic to this browser,
I didn't get too close.

It is a tiny program and should work on most things. If you find that it 
doesn't work for you then please let me know. I might even be able to help.


5. Installation
========================================

The following files are needed:
 - trailtimes.exe
 - trailtimes.xsl
 - trailtimes.css

They can be put in any directory. 
There is no installation script.

There is also an example included:
 - trailtimes.xml


6. How it works
========================================

One of the easiest ways to mock up a quick report is as a web document.
Unfortunately HTML is not the best way to store information that you may want
to edit with a third-party program. It is also not very good at calculating 
values.

XML (eXtended Markup Language) is a human-readable general-purpose 
specification for structuring, storing, and transporting data. It is a
widely accepted way of sharing information over the Internet in a way 
that computers can use, regardless of their operating system.
 
XSLT (eXtensible Stylesheet Language Transformations) is an XML-based language
commonly used to convert XML documents into HTML. It provides a means of 
describing how an XML resource should be displayed.

CSS (Cascading Style Sheets) is a stylesheet language used to describe the 
presentation of a document written in a markup language (e.g. HTML) 

The one thing missing is an easy way to edit the data in the XML file. 
It could be loaded into something like notepad and edited directly but that 
could get messy and you'd still have to manually calculate things like the 
check opening times and the average speeds, etc. 

*TrailTime* is a windows console program that provides a simple prompt-based
method of creating and editing the trailtime XML files.

As TrailTime closes it tries to automatically load the newly written XML 
file into your default web browser.


7. Usage
========================================

Run the trailtime executable. No, it is not a "windows" program. It is a 
CLI (command line interface) console app and runs from a command prompt.

Yes, you can also run it by browsing to the appropriate directory with Windows 
Explorer and double-clicking on the trailtimes.exe icon.
 
By default it will create a file called trailtime.xml. 
You can provide a different file on the cmd line if you want.

  c:\> Trailtime woodhill.xml

Answer all the questions.

When TrailTime finishes the report should open in your web browser window.

The web browser loads the XML file, which uses the linked XSL file to create 
an HTML file that gets its styles from the CSS file.
 
You can edit any of the XML data by re-running TrailTime.

For instance, to change the start time...
 - Hit enter to accept defaults until start time comes up.
 - Edit the existing time to the new time.
 - Hit enter on all the other prompts as the program works its way through the
   file updating all the other check times.


8. Printing
========================================

 - In firefox I do a print preview. 
 - Select *Landscape* mode.
 - If it won't fit on one page (start + 7 checks and seperate junior, 
intermediate, and expert finishes should fit on a page) then change the scale 
to 90% or even 80%. 
 - Print. 


9. Customization
========================================

Any half-pie intelligent fiddler could change either the XSL or CSS file to
create a totally different looking report.

You could even get rid of either the CSS or the XSL file (you'd need at least 
one of them) but this would take a little more then a quick fiddle.

You can also open and edit the XML file to your heart's content, although you
shouldn't have to. Be aware that if you create an invalid file by missing a 
tag or putting a tag in the wrong place then things will stop working.

Of course you can just refresh the XML file again by running TrailTime. 

Warning! if you've mucked up the XML too much , you might need to delete the 
existing XML file and re-create it from scratch. 

 
10. Creating a stand-alone HTML file
========================================

I can't think of why you'd want to do this but, if you do, here's how 
I did it.

Download and install the Expat XML parser (I have v2.0.1)
   http://www.libexpat.org/

Download and install the Sablotron  XML processor (I have v1.0.3)
   http://www.gingerall.org

Use a cmd like 
   sabcmd trailtime.xsl trailtime.xml > trailtime.html

This will create a stand-alone HTML file (ok, it still needs the CSS file)
that should display in any CSS capable browser.


