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 2006/03/10 22:03:39 UTC
svn commit: r384916 - in /xalan/java/trunk/src/org/apache/xml/serializer:
SerializerBase.java ToHTMLSAXHandler.java ToHTMLStream.java ToStream.java
Author: minchau
Date: Fri Mar 10 13:03:37 2006
New Revision: 384916
URL: http://svn.apache.org/viewcvs?rev=384916&view=rev
Log:
Fixes to various serializer reset() methods for fields that were
newer and forgotten. Fix for XALANJ-2279
Modified:
xalan/java/trunk/src/org/apache/xml/serializer/SerializerBase.java
xalan/java/trunk/src/org/apache/xml/serializer/ToHTMLSAXHandler.java
xalan/java/trunk/src/org/apache/xml/serializer/ToHTMLStream.java
xalan/java/trunk/src/org/apache/xml/serializer/ToStream.java
Modified: xalan/java/trunk/src/org/apache/xml/serializer/SerializerBase.java
URL: http://svn.apache.org/viewcvs/xalan/java/trunk/src/org/apache/xml/serializer/SerializerBase.java?rev=384916&r1=384915&r2=384916&view=diff
==============================================================================
--- xalan/java/trunk/src/org/apache/xml/serializer/SerializerBase.java (original)
+++ xalan/java/trunk/src/org/apache/xml/serializer/SerializerBase.java Fri Mar 10 13:03:37 2006
@@ -1247,23 +1247,30 @@
private void resetSerializerBase()
{
this.m_attributes.clear();
- this.m_StringOfCDATASections = null;
- this.m_elemContext = new ElemContext();
+ this.m_CdataElems = null;
+ this.m_cdataTagOpen = false;
+ this.m_docIsEmpty = true;
this.m_doctypePublic = null;
this.m_doctypeSystem = null;
this.m_doIndent = false;
+ this.m_elemContext = new ElemContext();
this.m_indentAmount = 0;
this.m_inEntityRef = false;
this.m_inExternalDTD = false;
this.m_mediatype = null;
this.m_needToCallStartDocument = true;
this.m_needToOutputDocTypeDecl = false;
+ if (m_OutputProps != null)
+ this.m_OutputProps.clear();
+ if (m_OutputPropsDefault != null)
+ this.m_OutputPropsDefault.clear();
if (this.m_prefixMap != null)
this.m_prefixMap.reset();
this.m_shouldNotWriteXMLHeader = false;
this.m_sourceLocator = null;
this.m_standalone = null;
this.m_standaloneWasSpecified = false;
+ this.m_StringOfCDATASections = null;
this.m_tracer = null;
this.m_transformer = null;
this.m_version = null;
Modified: xalan/java/trunk/src/org/apache/xml/serializer/ToHTMLSAXHandler.java
URL: http://svn.apache.org/viewcvs/xalan/java/trunk/src/org/apache/xml/serializer/ToHTMLSAXHandler.java?rev=384916&r1=384915&r2=384916&view=diff
==============================================================================
--- xalan/java/trunk/src/org/apache/xml/serializer/ToHTMLSAXHandler.java (original)
+++ xalan/java/trunk/src/org/apache/xml/serializer/ToHTMLSAXHandler.java Fri Mar 10 13:03:37 2006
@@ -738,6 +738,7 @@
*/
private void resetToHTMLSAXHandler()
{
+ this.m_dtdHandled = false;
this.m_escapeSetting = false;
}
}
Modified: xalan/java/trunk/src/org/apache/xml/serializer/ToHTMLStream.java
URL: http://svn.apache.org/viewcvs/xalan/java/trunk/src/org/apache/xml/serializer/ToHTMLStream.java?rev=384916&r1=384915&r2=384916&view=diff
==============================================================================
--- xalan/java/trunk/src/org/apache/xml/serializer/ToHTMLStream.java (original)
+++ xalan/java/trunk/src/org/apache/xml/serializer/ToHTMLStream.java Fri Mar 10 13:03:37 2006
@@ -2012,16 +2012,16 @@
boolean ret = super.reset();
if (!ret)
return false;
- initToHTMLStream();
+ resetToHTMLStream();
return true;
}
- private void initToHTMLStream()
+ private void resetToHTMLStream()
{
-// m_elementDesc = null;
+ // m_htmlcharInfo remains unchanged
+ // m_htmlInfo = null; // Don't reset
m_inBlockElem = false;
m_inDTD = false;
-// m_isRawStack.clear();
m_omitMetaTag = false;
m_specialEscapeURLs = true;
}
Modified: xalan/java/trunk/src/org/apache/xml/serializer/ToStream.java
URL: http://svn.apache.org/viewcvs/xalan/java/trunk/src/org/apache/xml/serializer/ToStream.java?rev=384916&r1=384915&r2=384916&view=diff
==============================================================================
--- xalan/java/trunk/src/org/apache/xml/serializer/ToStream.java (original)
+++ xalan/java/trunk/src/org/apache/xml/serializer/ToStream.java Fri Mar 10 13:03:37 2006
@@ -105,14 +105,16 @@
protected boolean m_isprevtext = false;
+ private static final char[] s_systemLineSep =
+ System.getProperty("line.separator").toCharArray();
/**
* The system line separator for writing out line breaks.
* The default value is from the system property,
* but this value can be set through the xsl:output
* extension attribute xalan:line-separator.
*/
- protected char[] m_lineSep =
- System.getProperty("line.separator").toCharArray();
+ protected char[] m_lineSep = s_systemLineSep;
+
/**
* True if the the system line separator is to be used.
@@ -3262,27 +3264,26 @@
*
*/
// this.m_charInfo = null; // don't set to null
-
this.m_disableOutputEscapingStates.clear();
+ // this.m_encodingInfo = null; // don't set to null
this.m_escaping = true;
// Leave m_format alone for now - Brian M.
// this.m_format = null;
+ this.m_expandDTDEntities = true;
this.m_inDoctype = false;
this.m_ispreserve = false;
- this.m_ispreserve = false;
this.m_isprevtext = false;
this.m_isUTF8 = false; // ?? used anywhere ??
+ this.m_lineSep = s_systemLineSep;
+ this.m_lineSepLen = s_systemLineSep.length;
+ this.m_lineSepUse = true;
+ // this.m_outputStream = null; // Don't reset it may be re-used
this.m_preserves.clear();
this.m_shouldFlush = true;
this.m_spaceBeforeClose = false;
this.m_startNewLine = false;
- this.m_lineSepUse = true;
- // DON'T SET THE WRITER TO NULL, IT MAY BE REUSED !!
- // this.m_writer = null;
- this.m_expandDTDEntities = true;
this.m_writer_set_by_user = false;
-
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org