jkesselm 01/11/09 08:53:57
Modified: java/src/org/apache/xalan/transformer ResultTreeHandler.java
Log:
Bugzilla 4344: discard attrs which don't have an element to belong to
Revision Changes Path
1.52 +17 -1
xml-xalan/java/src/org/apache/xalan/transformer/ResultTreeHandler.java
Index: ResultTreeHandler.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/ResultTreeHandler.java,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- ResultTreeHandler.java 2001/11/07 14:42:26 1.51
+++ ResultTreeHandler.java 2001/11/09 16:53:57 1.52
@@ -894,8 +894,12 @@
}
/**
- * Flush the pending element.
+ * Flush the pending element, and any attributes associated with it.
*
+ * NOTE: If there are attributes but _no_ pending element (which can
+ * happen if the user's stylesheet is doing something inappropriate),
+ * we still want to make sure they are flushed.
+ *
* @param type Event type
*
* NEEDSDOC @param flushPrefixes
@@ -938,6 +942,18 @@
}
m_nsContextPushed = false;
+ }
+
+ else // Bugzila4344
+ {
+ // %REVIEW% I'm not sure how much of this is actually needed and/or
+ // appropriate. In particular, do we really want to flush m_namespaces?
+ m_attributes.clear();
+ m_nsDeclsHaveBeenAdded = false;
+ m_name = null;
+ m_url = null;
+ m_localName = null;
+ m_namespaces = null;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]