Find the path root. @param parts: A list of path parts. @type parts: [str,..] @return: The root. @rtype: L{xsd.sxbase.SchemaObject}
(self, parts)
| 118 | return result |
| 119 | |
| 120 | def root(self, parts): |
| 121 | """ |
| 122 | Find the path root. |
| 123 | @param parts: A list of path parts. |
| 124 | @type parts: [str,..] |
| 125 | @return: The root. |
| 126 | @rtype: L{xsd.sxbase.SchemaObject} |
| 127 | """ |
| 128 | result = None |
| 129 | name = parts[0] |
| 130 | log.debug('searching schema for (%s)', name) |
| 131 | qref = self.qualify(parts[0]) |
| 132 | query = BlindQuery(qref) |
| 133 | result = query.execute(self.schema) |
| 134 | if result is None: |
| 135 | log.error('(%s) not-found', name) |
| 136 | raise PathResolver.BadPath(name) |
| 137 | else: |
| 138 | log.debug('found (%s) as (%s)', name, Repr(result)) |
| 139 | return result |
| 140 | |
| 141 | def branch(self, root, parts): |
| 142 | """ |