/** Check if the given Element matches this selector. Note: the parser should give all class */ public boolean matches(Object e, AttributeResolver attRes, TreeResolver treeRes) { if (siblingSelector != null) { Object sib = siblingSelector.getAppropriateSibling(e, treeRes); if (sib == null) { return false; } if (!siblingSelector.matches(sib, attRes, treeRes)) { return false; } } if (_name == null || treeRes.matchesElement(e, _namespaceURI, _name)) { if (conditions != null) { // all conditions need to be true for (java.util.Iterator i = conditions.iterator(); i.hasNext(); ) { Condition c = (Condition) i.next(); if (!c.matches(e, attRes, treeRes)) { return false; } } } return true; } return false; }