minchau 2003/08/12 12:59:42
Modified: java/src/org/apache/xml/serializer ToStream.java
Log:
PR: bugzilla 19591
Submitted by: Gordon Chiu
Reviewed by: Brian Minchau
Fixes a few methods in the ToStream serializer so that it outputs the DOCTYPE
sooner and in the correct location. Thanks to Bruno Dumon for the nice test
case
and thanks to Gordon Chiu for the fix.
- Brian Minchau
Revision Changes Path
1.20 +15 -0
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.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- ToStream.java 17 Jul 2003 22:04:36 -0000 1.19
+++ ToStream.java 12 Aug 2003 19:59:42 -0000 1.20
@@ -355,6 +355,11 @@
try
{
final java.io.Writer writer = m_writer;
+ if (m_needToOutputDocTypeDecl)
+ {
+ outputDocTypeDecl(m_elemContext.m_elementName, false);
+ m_needToOutputDocTypeDecl = false;
+ }
if (m_inDoctype)
{
writer.write(" [");
@@ -398,6 +403,11 @@
return;
try
{
+ if (m_needToOutputDocTypeDecl)
+ {
+ outputDocTypeDecl(m_elemContext.m_elementName, false);
+ m_needToOutputDocTypeDecl = false;
+ }
if (m_inDoctype)
{
final java.io.Writer writer = m_writer;
@@ -832,6 +842,11 @@
try
{
final java.io.Writer writer = m_writer;
+ if (m_needToOutputDocTypeDecl)
+ {
+ outputDocTypeDecl(m_elemContext.m_elementName, false);
+ m_needToOutputDocTypeDecl = false;
+ }
if (m_inDoctype)
{
writer.write(" [");
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]