def select(cls, selector, item, obj=None, key=None):
        if isinstance(selector, basestring):
            return item.xpath(selector)
        elif isinstance(selector, _Filter):
            selector._key = key
            selector._obj = obj
            return selector(item)
        elif callable(selector):
            return selector(item)
        else:
            return selector