switch to spyne.const.xml
fix document check being at the wrong place