Merge pull request #365 from ashimaathri/add-namespace-to-attribute-value

Add a namespace for AttributeValue xsi:type value
This commit is contained in:
Roland Hedberg
2016-10-12 17:19:49 +02:00
committed by GitHub

View File

@@ -169,6 +169,13 @@ class AttributeValueBase(SamlBase):
except AttributeError: except AttributeError:
self._extatt[XSI_TYPE] = typ self._extatt[XSI_TYPE] = typ
if typ.startswith('xs:'):
try:
self.extension_attributes['xmlns:xs'] = XS_NAMESPACE
except AttributeError:
self._extatt['xmlns:xs'] = XS_NAMESPACE
def get_type(self): def get_type(self):
try: try:
return self.extension_attributes[XSI_TYPE] return self.extension_attributes[XSI_TYPE]