Allow specifying prefixes for namespaces in the XML that a SAML class instance is serialized to.

This commit is contained in:
Roland Hedberg
2014-03-18 09:58:36 +01:00
parent bbe62602e8
commit 58181bd655

View File

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