Find the leaf. @param parts: A list of path parts. @type parts: [str,..] @param parent: The leaf's parent. @type parent: L{xsd.sxbase.SchemaObject} @return: The leaf. @rtype: L{xsd.sxbase.SchemaObject}
(self, parent, parts)
| 162 | return result |
| 163 | |
| 164 | def leaf(self, parent, parts): |
| 165 | """ |
| 166 | Find the leaf. |
| 167 | @param parts: A list of path parts. |
| 168 | @type parts: [str,..] |
| 169 | @param parent: The leaf's parent. |
| 170 | @type parent: L{xsd.sxbase.SchemaObject} |
| 171 | @return: The leaf. |
| 172 | @rtype: L{xsd.sxbase.SchemaObject} |
| 173 | """ |
| 174 | name = splitPrefix(parts[-1])[1] |
| 175 | if name.startswith('@'): |
| 176 | result, path = parent.get_attribute(name[1:]) |
| 177 | else: |
| 178 | result, ancestry = parent.get_child(name) |
| 179 | if result is None: |
| 180 | raise PathResolver.BadPath(name) |
| 181 | return result |
| 182 | |
| 183 | def qualify(self, name): |
| 184 | """ |
no test coverage detected