Traverse the path until the leaf is reached. @param parts: A list of path parts. @type parts: [str,..] @param root: The root. @type root: L{xsd.sxbase.SchemaObject} @return: The end of the branch. @rtype: L{xsd.sxbase.SchemaObject}
(self, root, parts)
| 139 | return result |
| 140 | |
| 141 | def branch(self, root, parts): |
| 142 | """ |
| 143 | Traverse the path until the leaf is reached. |
| 144 | @param parts: A list of path parts. |
| 145 | @type parts: [str,..] |
| 146 | @param root: The root. |
| 147 | @type root: L{xsd.sxbase.SchemaObject} |
| 148 | @return: The end of the branch. |
| 149 | @rtype: L{xsd.sxbase.SchemaObject} |
| 150 | """ |
| 151 | result = root |
| 152 | for part in parts[1:-1]: |
| 153 | name = splitPrefix(part)[1] |
| 154 | log.debug('searching parent (%s) for (%s)', Repr(result), name) |
| 155 | result, ancestry = result.get_child(name) |
| 156 | if result is None: |
| 157 | log.error('(%s) not-found', name) |
| 158 | raise PathResolver.BadPath(name) |
| 159 | else: |
| 160 | result = result.resolve(nobuiltin=True) |
| 161 | log.debug('found (%s) as (%s)', name, Repr(result)) |
| 162 | return result |
| 163 | |
| 164 | def leaf(self, parent, parts): |
| 165 | """ |
no test coverage detected