validating shib conf files using python

Peter Schober peter.schober at univie.ac.at
Thu Jul 10 11:44:32 EDT 2014


* Liam Hoekenga <liamr at umich.edu> [2014-07-10 16:58]:
> 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>
>
> 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 '{
> http://www.w3.org/2001/XMLSchema-instance}type': The QName value 'Simple'
> of the xsi:type attribute does not resolve to a type definition., line 1",)
>
> 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.

That's really a question for the libxml2 or lxml folks. But the error
at least does give you the problem (the value 'Simple' is not of a
defined type) and the line number where it occurs.

Looking forward to seeing the results of your work!
-peter


More information about the users mailing list