First, I'll capture here some of the information that has arrived in direct email.
=====
DRRW:
I just ran the template on my Ubuntu 12.04 system with Oxygen 14 and Saxon 9.4.0.3 and it worked perfectly!
OMG - so my hunch appears correct - that this is a Windows platform issue then - must be something to do with timings and calls to external Java functions for date/time and random, wait until those return before processing continues.
=====
Radu Coravu, oXygen:
Both on Windows and Linux an Oxygen kit is available either with the Java VM 64-bit or with the Java VM 32-bit.
David, if you are using the 64-bit Oxygen kit on Windows, could you also try to install the 32-bit kit and try to reproduce the same problem?
About 2 months ago I noticed some strange behavior in which the FO processor RenderX XEP was started from Oxygen using the 64-bit Java VM and parsed using SAX an XSL-FO file, it randomly did not correctly report certain attribute values for certain elements. The Java 64-bit VM tries to optimize code which is run very often and there have been situations in the past in which these optimizations made the code not predictable.
=====
Dave, could I confirm what I am looking for here?
I'm transforming HospitalStatus-lookups-new.cxf using cam-2-example.xsl. This generates a primary result file and three secondary result documents called testexample-1.xml, testexample-2.xml, and testexample-3.xml. I tried comparing testexample-1.xml with the supplied corrrect-testexample-1.xml and error-2-testexample-1.xml and it doesn't seem to be the same as either.
However, I have established that testexample-1 is different depending on whether I run with Saxon 9.4.0.4 or with 9.1.0.8, so I guess this means I am seeing the problem. The first significant difference is that on the element, 9.1.0.8 gives different attributes (both names and values differ). So I'll try and investigate that.