write orientation into XML for #216