<div dir="ltr"><div>This is only tangentially a shibboleth question. </div><br>I'm trying to generate shibboleth configuration (XML) files by combining small files containing configuration segments using python 2.7.x and lxml. Rather than just smash them together, I'd actually like to validate the resulting XML. (I'd be happy to share the work when I'm done.)<br>
I've got a element that does not conform to the schema (on purpose).. <resolver:AttributeDefinition xsi:type="Simple" id="uid" sourceAttributeID="uid"> ... </resolver:AttributeDefinition><br>
And when I check my document with assertValid (lxml.etree.XMLschema), I get an error like this... (u"Element '{urn:mace:shibboleth:2.0:resolver}AttributeDefinition', attribute '{<a href="http://www.w3.org/2001/XMLSchema-instance}type">http://www.w3.org/2001/XMLSchema-instance}type</a>': The QName value 'Simple' of the xsi:type attribute does not resolve to a type definition., line 1",)<br>
Is it possible obtain more information from the exception?I'd really like to be able to print the "id" attribute from the broken element.<br>Liam</div>