In advance of the meeting with Simon I went through the files and got Martin to send me the XSLT which takes my xml input and generates ids for the recorder's reports and the trials. (Bailey_add_id.xsl and Bailey_ids_added.txt) Those ids are hexadecimal and there doesn't seem to be a way to turn those into decimal integers in xpath, so the output file will need to be processed.