'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}'

def branch(self, root, parts):

    result = root
    for part in parts[1:(-1)]:
        name = splitPrefix(part)[1]
        log.debug('searching    parent    (%s)    for    (%s)', Repr(result), name)
        (result, ancestry) = result.get_child(name)
        if (result is None):
            log.error('(%s)    not-found', name)
            raise PathResolver.BadPath(name)
        else:
            result = result.resolve(nobuiltin=True)
            log.debug('found    (%s)    as    (%s)', name, Repr(result))
    return result
