add "ref" attribute to "header" element for #16
process ref attribute of header element for #16
tests for #16
tests for #16