CUCC Expedition Handbook

Cave data file

These files live in :expoweb:/cave_data/

The example full format below is of a very simple cave with hardly any fields filled in. There will only be an additional description file for large and complex caves.

<!-- Only put one cave in this file -->
<!-- If you edit this file, make sure you update the websites database -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<cave>
	<non_public>True</non_public>
	<official_name>Ritscherbachhöhle</official_name>
	<area>11</area>
	<kataster_code>1/T(W) +</kataster_code>
	<kataster_number>4</kataster_number> 
	<unofficial_number></unofficial_number>

	<entrance>
		<entranceslug>1623-4</entranceslug>
		<letter></letter>
	</entrance>

	<explorers>Höhlenforschervereinigung Altaussee, 1937</explorers>
	<underground_description></underground_description>
	<equipment></equipment>
	<references></references>
	<survey>Plan at 1:100 by Alfred Auer, 1968 </survey>
	<kataster_status></kataster_status>
	<underground_centre_line></underground_centre_line>
	<notes></notes>
	<length>12.3m</length>
	<depth>1.07m</depth>
	<extent></extent>
	<survex_file></survex_file>
	<description_file></description_file>
	
</cave>
</body>
</html>

As you can see, this is an XML tag format similar to HTML but with tags defined to hold cave survey data. These files are processed by troggle in real-time to produce an HTML file on the fly which is sent to your browser so that it looks like this

An explanation of what the field names mean and how they are used is on the cave entry fields page. There is not an exact correspondance between the form and the file format however.

When you fill in the online form you creating a file just like the one above: troggle takes the input data from the form and creates the file. Troggle also stores the cave information in it's live memory when you use the form method.

If instead of using the form you create the file by hand and upload it to the server you will also need find a nerd to run the cave import procedure before troggle "knows" that the cave exists.

Cave entrances

There is an exactly analogous file for cave entrances except that those files live in :expoweb:/entrance_data/

Template Files - please use these

There are template files for you to fill-in when creating new caves and entrance in the online system. Download them:

These are XML files, exactly as shown above, but with extensive instructions within each file.

File layout

The caves in our site are stored as XML files in the directory :expoweb:/cave_data and in files named :expoweb:/cave_data/{area}-{cavenumber}.html. Entrances are correspondingly in :expoweb:/entrance_data files, with the same naming convention, except that if there is more than one entrance they have a,b,c suffixes, e.g. :expoweb:/entrance_data/{area}-{cavenumber}b

Any associated files, usually photos and surveys, are stored under the area names :expoweb:/1623/{cavenumber}/ent_photo1.jpg or :expoweb:/1626/{cavenumber}/ Note that this is a different naming convention: caves and entrances have the {area} as part of the file name whereas associated files have the {area} as a directory in which the files are stored.

An understanding of this file layout is very important when filling in the forms or writing the tags so that images appear on the final published website. The URLs in the XML file should be relative URLs to the cave page, which appears as cave/{area}/{cavenumber} on the website even though internally the data is coming from cave_data/{area}-{cavenumber}.html and entrance_data/{area}-{cavenumber}.html

Handy tips for images

Cave description files get moved about quite a bit while a cave is being actively explored. And even if the files are not moved, the user-visible URL can move (remember the 171 and 172 caves had different levels of nesting in the url). Doing either of those breaks all the image links unless you do it like this:


Back to the form-filling method the form-filling method guide