You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by Gabor Liptak <ga...@usa.net> on 2000/01/11 00:14:49 UTC

cvs diff xml-xerces/java/src/org/apache/xml/serialize/BaseMarkupSerializer.java

making parsing more bullet-proof (maybe even too much so :)

Index: java/src/org/apache/xml/serialize/BaseMarkupSerializer.java
===================================================================
RCS file:
/home/cvspublic/xml-xerces/java/src/org/apache/xml/serialize/BaseMarkupSerializer.java,v
retrieving revision 1.1
diff -u -r1.1 BaseMarkupSerializer.java
--- BaseMarkupSerializer.java	2000/01/03 19:38:50	1.1
+++ BaseMarkupSerializer.java	2000/01/10 23:12:20
@@ -630,9 +630,13 @@
 				    String systemId, String notationName )
     {
 	enterDTD();
-	if ( publicId != null ) {
-	    printText( "<!ENTITY " + name + " SYSTEM " );
-	    printDoctypeURL( systemId );
+	if ( publicId == null ) {
+	    if ( systemId == null ) {
+	      printText( "<!ENTITY " + name + " " );
+            } else {
+	      printText( "<!ENTITY " + name + " SYSTEM " );
+	      printDoctypeURL( systemId );
+            }
 	} else {
 	    printText( "<!ENTITY " + name + " PUBLIC " );
 	    printDoctypeURL( publicId );


____________________________________________________________________
Get free email and a permanent address at http://www.amexmail.com/?A=1