XSD: Handle "no type" case for <element>.
XSD: Fix type bug in convert_element, and improve error reporting.