<div dir="ltr"><div>This is only tangentially a shibboleth question. </div><br>I&#39;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&#39;d actually like to validate the resulting XML.  (I&#39;d be happy to share the work when I&#39;m done.)<br>

I&#39;ve got a element that does not conform to the schema (on purpose)..  &lt;resolver:AttributeDefinition xsi:type=&quot;Simple&quot; id=&quot;uid&quot; sourceAttributeID=&quot;uid&quot;&gt;    ...  &lt;/resolver:AttributeDefinition&gt;<br>

And when I check my document with assertValid (lxml.etree.XMLschema), I get an error like this...  (u&quot;Element &#39;{urn:mace:shibboleth:2.0:resolver}AttributeDefinition&#39;, attribute &#39;{<a href="http://www.w3.org/2001/XMLSchema-instance}type">http://www.w3.org/2001/XMLSchema-instance}type</a>&#39;: The QName value &#39;Simple&#39; of the xsi:type attribute does not resolve to a type definition., line 1&quot;,)<br>

Is it possible obtain more information from the exception?I&#39;d really like to be able to print the &quot;id&quot; attribute from the broken element.<br>Liam</div>