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

Method autoblend

suds/xsd/schema.py:99–118  ·  view source on GitHub ↗

Ensure that all schemas within the collection import each other which has a blending effect. @return: self @rtype: L{SchemaCollection}

(self)

Source from the content-addressed store, hash-verified

97 return merged
98
99 def autoblend(self):
100 """
101 Ensure that all schemas within the collection
102 import each other which has a blending effect.
103 @return: self
104 @rtype: L{SchemaCollection}
105 """
106 namespaces = self.namespaces.keys()
107 for s in self.children:
108 for ns in namespaces:
109 tns = s.root.get('targetNamespace')
110 if tns == ns:
111 continue
112 for imp in s.root.getChildren('import'):
113 if imp.get('namespace') == ns:
114 continue
115 imp = Element('import', ns=Namespace.xsdns)
116 imp.set('namespace', ns)
117 s.root.append(imp)
118 return self
119
120 def locate(self, ns):
121 """

Callers 1

loadMethod · 0.95

Calls 6

getMethod · 0.95
setMethod · 0.95
ElementClass · 0.90
getChildrenMethod · 0.80
keysMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected