Code extracted from: git://xdmf.org/Xdmf.git at commit 0c08b3eaff5b4c4a7f620451386cf70d024c8bef (master).