simple = ( (ConditionalSelector)selector ).getSimpleSelector();
simple = ( (ConditionalSelector)simple ).getSimpleSelector();
    private void addChainedSelector( net.homelinux.tobe.css.Selector s, Selector selector ) {        int axis = 0;        SimpleSelector simple = null;        switch ( selector.getSelectorType() ) {            case Selector.SAC_DIRECT_ADJACENT_SELECTOR:                axis = net.homelinux.tobe.css.Selector.IMMEDIATE_SIBLING_AXIS;                simple = ( (SiblingSelector)selector ).getSiblingSelector();                break;            case Selector.SAC_CHILD_SELECTOR:                axis = net.homelinux.tobe.css.Selector.CHILD_AXIS;                simple = ( (DescendantSelector)selector ).getSimpleSelector();                break;            case Selector.SAC_DESCENDANT_SELECTOR:                axis = net.homelinux.tobe.css.Selector.DESCENDANT_AXIS;                simple = ( (DescendantSelector)selector ).getSimpleSelector();                break;            default:                System.err.println( "Bad selector" );        }        Condition cond = null;        if ( simple.getSelectorType() == Selector.SAC_CONDITIONAL_SELECTOR ) {            cond = ( (ConditionalSelector)selector ).getCondition();            //if ConditionalSelectors can be nested, we are in trouble here            simple = ( (ConditionalSelector)selector ).getSimpleSelector();        }        if ( simple.getSelectorType() == Selector.SAC_ELEMENT_NODE_SELECTOR ) {            s = s.appendChainedSelector( axis, ( (ElementSelector)simple ).getLocalName() );        }        if ( cond != null ) {            addConditions( s, cond );        }    }