You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mi...@apache.org on 2003/11/25 03:42:19 UTC
cvs commit: xml-xalan/java/src/org/apache/xml/serializer ToStream.java
minchau 2003/11/24 18:42:19
Modified: java/src/org/apache/xml/serializer ToStream.java
Log:
PR: bugzilla 24958
Submitted by: Brian Minchau
Revision Changes Path
1.27 +15 -16 xml-xalan/java/src/org/apache/xml/serializer/ToStream.java
Index: ToStream.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/serializer/ToStream.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- ToStream.java 23 Oct 2003 20:31:14 -0000 1.26
+++ ToStream.java 25 Nov 2003 02:42:19 -0000 1.27
@@ -1801,8 +1801,8 @@
m_elemContext = m_elemContext.push(namespaceURI,localName,name);
m_isprevtext = false;
- if (m_tracer != null)
- firePseudoAttributes();
+ if (m_tracer != null)
+ firePseudoAttributes();
}
/**
@@ -2799,13 +2799,12 @@
{
// flush out the "<elemName" if not already flushed
m_writer.flush();
-
+
+ // make a StringBuffer to write the name="value" pairs to.
+ StringBuffer sb = new StringBuffer();
int nAttrs = m_attributes.getLength();
if (nAttrs > 0)
{
- // make a StringBuffer to write the name="value" pairs to.
- StringBuffer sb = new StringBuffer();
-
// make a writer that internally appends to the same
// StringBuffer
java.io.Writer writer =
@@ -2815,17 +2814,17 @@
// Don't clear the attributes!
// We only want to see what would be written out
// at this point, we don't want to loose them.
-
- // convert the StringBuffer to a char array and
- // emit the trace event that these characters "might"
- // be written
- char ch[] = sb.toString().toCharArray();
- m_tracer.fireGenerateEvent(
- SerializerTrace.EVENTTYPE_OUTPUT_PSEUDO_CHARACTERS,
- ch,
- 0,
- ch.length);
}
+ sb.append('>'); // the potential > after the attributes.
+ // convert the StringBuffer to a char array and
+ // emit the trace event that these characters "might"
+ // be written
+ char ch[] = sb.toString().toCharArray();
+ m_tracer.fireGenerateEvent(
+ SerializerTrace.EVENTTYPE_OUTPUT_PSEUDO_CHARACTERS,
+ ch,
+ 0,
+ ch.length);
}
catch (IOException ioe)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org