We are using a DTL transformation to take HL7 and transform into custom XML. But the nodes in the resulting XML are appearing out of sequence - and therefore failing validation against the schema.
The XSD schema for the XML looks fine when imported into Ensemble: root node in the XSD looks like this:.png)
And shows in Ensemble like this:
The transformation looks like this, and we can see the text from the trace elements at lines 5, 12 and 19 appear in the correct order in the event log:
HOWEVER, the resulting XML has the <allergies> nodes before the <patientNotes> nodes....:
Any ideas about why this is

.png)

.png)

