while (iter->hasNext()) { Expr* expr = (Expr*)iter->next(); if (expr->matches(node, context, cs)) { delete iter; return MB_TRUE; }
switch (mNodeType) { case COMMENT_TYPE: return type == Node::COMMENT_NODE; case TEXT_TYPE: return (type == Node::TEXT_NODE || type == Node::CDATA_SECTION_NODE) && !aContext->isStripSpaceAllowed(aNode); case PI_TYPE: if (type == Node::PROCESSING_INSTRUCTION_NODE) { txAtom* localName = 0; MBool result; result = !mNodeName || (aNode->getLocalName(&localName) && localName == mNodeName); TX_IF_RELEASE_ATOM(localName); return result; } return MB_FALSE; case NODE_TYPE: return ((type != Node::TEXT_NODE && type != Node::CDATA_SECTION_NODE) || !aContext->isStripSpaceAllowed(aNode));
MBool UnionExpr::matches(Node* node, Node* context, ContextState* cs) {    ListIterator* iter = expressions.iterator();    while (iter->hasNext()) {        Expr* expr = (Expr*)iter->next();        if (expr->matches(node, context, cs)) {             delete iter;             return MB_TRUE;        }    }    delete iter;    return MB_FALSE;} //-- matches