diff --git a/src/saml2/__init__.py b/src/saml2/__init__.py index 38631e4..8ea0a0c 100644 --- a/src/saml2/__init__.py +++ b/src/saml2/__init__.py @@ -444,13 +444,12 @@ class SamlBase(ExtensionContainer): c_children = {} c_attributes = {} c_attribute_type = {} - #c_attribute_use = {} - #c_attribute_required = {} c_child_order = [] c_cardinality = {} c_any = None c_any_attribute = None c_value_type = None + c_ns_prefix = None def _get_all_c_children_with_order(self): if len(self.c_child_order) > 0: @@ -549,6 +548,9 @@ class SamlBase(ExtensionContainer): constructing the text representation. :return: String representation of the object """ + if not nspair and self.c_ns_prefix: + nspair = self.c_ns_prefix + if nspair: for prefix, uri in nspair.items(): try: