MBool TextExpr::matches(Node* node, Node* context, ContextState* cs) { if ( node ) { if(node->getNodeType() == Node::TEXT_NODE) return !cs->isStripSpaceAllowed(node);
MBool BasicNodeExpr::matches(Node* node, Node* context, ContextState* cs) { if ( !node ) return MB_FALSE; switch ( type ) { case NodeExpr::COMMENT_EXPR: return (MBool) (node->getNodeType() == Node::COMMENT_NODE); case NodeExpr::PI_EXPR : return (MBool) (node->getNodeType() == Node::PROCESSING_INSTRUCTION_NODE); default: if(node->getNodeType() == Node::TEXT_NODE) return !cs->isStripSpaceAllowed(node); return MB_TRUE; break;
MBool TextExpr::matches(Node* node, Node* context, ContextState* cs) {    if ( node ) {        if(node->getNodeType() == Node::TEXT_NODE)            return !cs->isStripSpaceAllowed(node);    }    return MB_FALSE;} //-- matches