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

Method qualify

suds/xsd/sxbase.py:361–380  ·  view source on GitHub ↗

Convert attribute values, that are references to other objects, into I{qref}. Qualfied using default document namespace. Since many wsdls are written improperly: when the document does not define a default namespace, the schema target namespace is used to qu

(self)

Source from the content-addressed store, hash-verified

359 return ['type', 'ref']
360
361 def qualify(self):
362 """
363 Convert attribute values, that are references to other
364 objects, into I{qref}. Qualfied using default document namespace.
365 Since many wsdls are written improperly: when the document does
366 not define a default namespace, the schema target namespace is used
367 to qualify references.
368 """
369 defns = self.root.defaultNamespace()
370 if Namespace.none(defns):
371 defns = self.schema.tns
372 for a in self.autoqualified():
373 ref = getattr(self, a)
374 if ref is None:
375 continue
376 if isqref(ref):
377 continue
378 qref = qualify(ref, self.root, defns)
379 log.debug('%s, convert %s="%s" to %s', self.id, a, ref, qref)
380 setattr(self, a, qref)
381
382 def merge(self, other):
383 """

Callers 2

dereferenceMethod · 0.45
mergeMethod · 0.45

Calls 5

autoqualifiedMethod · 0.95
isqrefFunction · 0.90
qualifyFunction · 0.90
defaultNamespaceMethod · 0.80
noneMethod · 0.80

Tested by

no test coverage detected