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

Class AttrQuery

suds/xsd/query.py:147–169  ·  view source on GitHub ↗

Schema query class that searches for Attribute references in the specified schema. Matches on root Attribute by qname first, then searches deep into the document.

Source from the content-addressed store, hash-verified

145
146
147class AttrQuery(Query):
148 """
149 Schema query class that searches for Attribute references in the specified
150 schema. Matches on root Attribute by qname first, then searches deep into
151 the document.
152 """
153
154 def execute(self, schema):
155 result = schema.attributes.get(self.ref)
156 if self.filter(result):
157 result = self.__deepsearch(schema)
158 return self.result(result)
159
160 def __deepsearch(self, schema):
161 from suds.xsd.sxbasic import Attribute
162 result = None
163 for e in schema.all:
164 result = e.find(self.ref, (Attribute,))
165 if self.filter(result):
166 result = None
167 else:
168 break
169 return result
170
171
172class AttrGroupQuery(Query):

Callers 1

dependenciesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected