adds head and xml:id