Is there a way to get the specific class tag names from my spyne class definitions?
Given the case, my class hierarchy looks like this:
<!-- Response.xml -->
This is how XML polymorphism is supposed to work.
libxml2's schema validator (that you use through lxml) should interpret it properly.
OTOH, If you are sure you want distinction solely through tag names, have a look at the
<choice> tag: http://w3.org/TR/xmlschema-1/#declare-contentModel
Also see an article comparing the two approaches: http://ibm.com/developerworks/library/ws-tip-xsdchoice
You seem to have already figured out how to use polymorphism in Spyne. So here's how you use the
<choice> tag: https://github.com/arskom/spyne/blob/57ef5c0db51cb194353c67d317990fe89bc4177d/spyne/test/interface/test_xml_schema.py#L51