--- XMLStreamPublisher.java	Wed Oct 20 13:59:50 1999
+++ XMLStreamPublisher.java.old	Mon Nov 01 02:50:56 1999
@@ -122,7 +122,7 @@
         if ( publicId != null || systemId != null || internalDTD != null )
         {
             text.setLength( 0 );
-            text.append( "<!DOCTYPE " ).append( doc.getDocumentElement().getTagName() );
+            text.append( "<!DOCTYPE " ).append( docType.getNodeName() );
             if ( ! getFormat().isStandalone() )
             {
                 if ( publicId != null )
