These patches address a long standing problem with handling attributes in Xml. They refine the work that Francis did on the square lens a while ago in making sure the typechecker works as precisely as possible, and doesn't warn unnecessarily thinking that attr="value' is legal XML.