generalise handling of <item> a bit more, and make sure @xml:id on it is taken account of