@param root: The xml root. @type root: L{sax.element.Element} @param baseurl: The base url used for importing. @type baseurl: basestring @param options: An options dictionary. @type options: L{options.Options} @param container: An optional con
(self, root, baseurl, options, container=None)
| 192 | Tag = 'schema' |
| 193 | |
| 194 | def __init__(self, root, baseurl, options, container=None): |
| 195 | """ |
| 196 | @param root: The xml root. |
| 197 | @type root: L{sax.element.Element} |
| 198 | @param baseurl: The base url used for importing. |
| 199 | @type baseurl: basestring |
| 200 | @param options: An options dictionary. |
| 201 | @type options: L{options.Options} |
| 202 | @param container: An optional container. |
| 203 | @type container: L{SchemaCollection} |
| 204 | """ |
| 205 | self.root = root |
| 206 | self.id = objid(self) |
| 207 | self.tns = self.mktns() |
| 208 | self.baseurl = baseurl |
| 209 | self.container = container |
| 210 | self.children = [] |
| 211 | self.all = [] |
| 212 | self.types = {} |
| 213 | self.imports = [] |
| 214 | self.elements = {} |
| 215 | self.attributes = {} |
| 216 | self.groups = {} |
| 217 | self.agrps = {} |
| 218 | if options.doctor is not None: |
| 219 | options.doctor.examine(root) |
| 220 | form = self.root.get('elementFormDefault') |
| 221 | if form is None: |
| 222 | self.form_qualified = False |
| 223 | else: |
| 224 | self.form_qualified = form == 'qualified' |
| 225 | if container is None: |
| 226 | self.build() |
| 227 | self.open_imports(options) |
| 228 | log.debug('built:\n%s', self) |
| 229 | self.dereference() |
| 230 | log.debug('dereferenced:\n%s', self) |
| 231 | |
| 232 | def mktns(self): |
| 233 | """ |
nothing calls this directly
no test coverage detected