MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / add

Method add

suds/xsd/schema.py:60–74  ·  view source on GitHub ↗

Add a schema node to the collection. Schema(s) within the same target namespace are consolidated. @param schema: A schema object. @type schema: (L{Schema})

(self, schema)

Source from the content-addressed store, hash-verified

58 self.namespaces = {}
59
60 def add(self, schema):
61 """
62 Add a schema node to the collection. Schema(s) within the same target
63 namespace are consolidated.
64 @param schema: A schema object.
65 @type schema: (L{Schema})
66 """
67 key = schema.tns[1]
68 existing = self.namespaces.get(key)
69 if existing is None:
70 self.children.append(schema)
71 self.namespaces[key] = schema
72 else:
73 existing.root.children += schema.root.children
74 existing.root.nsprefixes.update(schema.root.nsprefixes)
75
76 def load(self, options):
77 """

Callers 1

build_schemaMethod · 0.95

Calls 3

getMethod · 0.45
appendMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected