XML fragment type checking