ShellShock's Crater

Creating HTML Statistics

Back to Contents


Q3Stats can display game statistics as an HTML file in a browser (Note: only Internet Explorer 5 or greater is supported).

If you have problems viewing the statistics in your browser window, then you may need to update your installation of Microsoft's XML parser: Installing Microsoft's XML Parser.

Three files are required to create the HTML statistics:

If you are familiar with XSL, you can edit this file to change how the XML is transformed into HTML.

The HTML statistics are created when:

To create the HTML statistics Q3Stats does the following:

  1. Saves the game statistics as XML in the filename_stats.xml file. 
  2. Copies the q3stats.xsl file from the Q3Offline Templates sub-directory to the same directory as the Q3Stats .q3s document. The copied q3stats.xsl file is renamed to filename_stats.xsl, where filename is the same name as the .q3s document.
  3. Copies the q3stats.html file from the Q3Offline Templates sub-directory to the same directory as the Q3Stats .q3s document. The copied q3stats.html file is renamed to filename_stats.html, where filename is the same name as the .q3s document. During the copy, Q3Stats replaces the lines between the //Q3STATS_START and //Q3STATS_END comments with the correct file names for the filename_stats.xml and the filename_stats.xsl files.

For example, if your Q3Stats document is called c:\Docs\q3a.q3s, then after the HTML statistics have been created, you will have three new files:

c:\Docs\q3a_stats.xml
c:\Docs\q3a_stats.xsl
c:\Docs\q3a_stats.html

The c:\Docs\q3a_stats.html file will contain the lines:

var g_sXSLFileName = "q3a_stats.xsl";
var g_sXMLFileName = "q3a_stats.xml";

To display the statistics, simply open the c:\Docs\q3a_stats.html file in a browser (Internet Explorer) window.

The statistics are displayed in tables; clicking on the button at the head of each column will sort the whole table on that column. There are also links between the tables for easy navigation.

You can copy and use the three files elsewhere; just make sure you copy them to the same directory.

HTML, XML and XSL are standard languages and are widely used on the Internet. See the World Wide Web Consortium Web Site for more details.