regxmllib
regxmllib copied to clipboard
Ordering of elements in XML output
The ordering of elements in XML 1.0 (as used by ST 2001-1:2013) is not guaranteed, but many XML tools and specifications utilise document order:
- the
childrenproperty of the document information item of the XML-infoset is an ordered list. - XPath
SMPTE ST 2001-1:2013 states:
no requirement exists to sort properties into an externally predetermined order
Hence, the XML output from regxmllib legitimately includes elements in any order it sees fit. This order appears to be a function of the input file.
I find this behaviour unhelpful when comparing MXF files using (canonical versions of) their Reg-XML representations. It could also be misleading to a user who might try (in spite of the specification details above) to infer meaning from differing element order.
Would it be possible to have regxmllib output elements in lexicographical order? At the very least, having the members of groups in lexicographical order would be helpful.