added advanced attribute selector handling