-
Notifications
You must be signed in to change notification settings - Fork 447
Open
Description
I load a custom XSD-file for a schema extension. It has a namespace long namespace assigned, however in the saml-messages this long namespace is not used in the tags, instead, they just are like <q1:TagName>. I resolved this by patching override_lookup_type and override_lookup_element like this:
orig_lookup_element = xmlschema.validators.global_maps.XsdGlobals.lookup_element
def override_lookup_element(self, qname):
if qname.startswith("q1:"):
qname = qname.replace("q1:", "{urn:foo:long:namespace}",1)
return orig_lookup_element(self, qname)
xmlschema.validators.global_maps.XsdGlobals.lookup_element = override_lookup_element
This seems very wrong to me. Is there another way to tell the thing that "q1" is an alias for the long namespace?
Metadata
Metadata
Assignees
Labels
No labels