The script build-command-templates checks syntax against the RELAX-NG schema, and should be called before generate_cache.py for a slightly less cryptic error message:
build/interface-definitions/xml-component-version.xml:1:0:ERROR:RELAXNGV:RELAXNG_ERR_TEXTWRONG: Did not expect text in element interfaceDefinition content
compared to
Load_error 'PCData not allowed here'
the latter from the package xml-light.