sboag 01/01/11 10:12:53
Modified: java/src/org/apache/xpath/patterns NodeTest.java
Log:
Check for CDATA section node as well as text node for whitespace stripping.
Revision Changes Path
1.18 +1 -1
xml-xalan/java/src/org/apache/xpath/patterns/NodeTest.java
Index: NodeTest.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xpath/patterns/NodeTest.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- NodeTest.java 2001/01/04 08:06:24 1.17
+++ NodeTest.java 2001/01/11 18:12:48 1.18
@@ -383,7 +383,7 @@
short nodeType = context.getNodeType();
// Yuck! Blech! -sb
- if(Node.TEXT_NODE == nodeType &&
!context.isSupported(SUPPORTS_PRE_STRIPPING, null))
+ if((Node.TEXT_NODE == nodeType || Node.CDATA_SECTION_NODE == nodeType)
&& !context.isSupported(SUPPORTS_PRE_STRIPPING, null))
{
Node parent = context.getParentNode();
if(null != parent && Node.ELEMENT_NODE == parent.getNodeType())