mmidy 01/03/07 10:18:22
Modified: java/src/org/apache/xalan/serialize SerializerToXML.java
Log:
Fix closing out doctype declaration
Revision Changes Path
1.4 +11 -6
xml-xalan/java/src/org/apache/xalan/serialize/SerializerToXML.java
Index: SerializerToXML.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/serialize/SerializerToXML.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SerializerToXML.java 2001/02/22 20:55:00 1.3
+++ SerializerToXML.java 2001/03/07 18:18:18 1.4
@@ -554,7 +554,7 @@
*
* @throws org.xml.sax.SAXException
*/
- void outputDocTypeDecl(String name) throws org.xml.sax.SAXException
+ void outputDocTypeDecl(String name, boolean closeDecl) throws
org.xml.sax.SAXException
{
accum("<!DOCTYPE ");
@@ -575,10 +575,15 @@
accum(" \"");
accum(m_doctypeSystem);
- //accum("\">");
- accum("\"");
+ if (closeDecl)
+ {
+ accum("\">");
+ outputLineSep();
+ }
+ else
+ accum("\"");
}
- //outputLineSep();
+
}
/**
@@ -681,7 +686,7 @@
if ((true == m_needToOutputDocTypeDecl)) // && (null != m_doctypeSystem))
{
- outputDocTypeDecl(name);
+ outputDocTypeDecl(name, false);
}
m_needToOutputDocTypeDecl = false;
@@ -833,7 +838,7 @@
if ((true == m_needToOutputDocTypeDecl) && (null != m_doctypeSystem))
{
- outputDocTypeDecl(name);
+ outputDocTypeDecl(name, true);
}
m_needToOutputDocTypeDecl = false;