robweir 00/02/16 11:57:42
Modified: src/org/apache/xalan/xslt StylesheetHandler.java
Log:
Preserve the state of m_lastPopped across PI's, so we'll merge whitespace
correctly
Revision Changes Path
1.20 +3 -1
xml-xalan/src/org/apache/xalan/xslt/StylesheetHandler.java
Index: StylesheetHandler.java
===================================================================
RCS file:
/home/cvs/xml-xalan/src/org/apache/xalan/xslt/StylesheetHandler.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- StylesheetHandler.java 2000/02/15 18:12:12 1.19
+++ StylesheetHandler.java 2000/02/16 19:57:42 1.20
@@ -1551,8 +1551,10 @@
// If it was surrounded by xsl:text, it will count as an element.
boolean isPrevCharData
= Constants.ELEMNAME_TEXTLITERALRESULT == lastElem.getXSLToken();
+
boolean isLastPoppedXSLText = (m_lastPopped != null) &&
(Constants.ELEMNAME_TEXT == m_lastPopped.getXSLToken());
+
if(isPrevCharData && !isLastPoppedXSLText)
{
parent.appendChild(elem);
@@ -1722,7 +1724,7 @@
throws SAXException
{
// No action for the moment.
- m_lastPopped = null; // Reset this so that it does not affect future
elements
+// m_lastPopped = null; // Reset this so that it does not affect
future elements
}