Ordering of attributes in a session file should not be significant
When attempting to use a session file that I have generated using some Python code (based on the ElementTree
library - https://docs.python.org/3.7/library/xml.etree.elementtree.html), I am getting an error from Nektar++:
Unknown boundary condition attribute: VAR
It seems that parsing some sections of another, existing, session file and then writing them out again into my modified file resulted in the ordering of the attributes being changed. According to section 3.1 of the XML spec, attribute ordering is not significant which is presumably why the ElementTree
library doesn't provide a way to specify or alter attribute ordering. In my generated XML, the N
element under BOUNDARYCONDITIONS/REGION
shows:
<N VALUE="0.0" VAR="u" />
When I manually edit the session file and switch the ordering of VALUE
and VAR
, the session file is read successfully.
I'm not clear whether this problem is specific to the way this particular element is handled or is something more general but I've only encountered the problem with this element.