Make the XPath engine handle CDATA sections as text-nodes.

b=92786 r=peterv, pike sr=jst

Mixed small fixes and comments.
b=99792 r=peterv sr=jst


git-svn-id: svn://10.0.0.236/trunk@103025 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sicking%bigfoot.com
2001-09-17 23:02:57 +00:00
parent 1d23a9848c
commit b44d102f77
12 changed files with 39 additions and 56 deletions

View File

@@ -93,10 +93,10 @@ MBool BasicNodeExpr::matches(Node* node, Node* context, ContextState* cs) {
return (MBool)(node->getNodeType() == Node::PROCESSING_INSTRUCTION_NODE &&
!nodeNameSet || nodeName.isEqual(node->getNodeName()));
default: //-- node()
if (node->getNodeType() == Node::TEXT_NODE)
if (node->getNodeType() == Node::TEXT_NODE ||
node->getNodeType() == Node::CDATA_SECTION_NODE)
return !cs->isStripSpaceAllowed(node);
return MB_TRUE;
break;
}
return MB_TRUE;
} //-- matches