[Expat-discuss] PUBLIC ID

Eric Bohlman ebohlman@earthlink.net
Thu, 21 Jun 2001 17:49:08 -0500


6/21/01 3:33:54 PM, "Jochen Hartmann" <jochen@cs.ucr.edu> wrote:
>I don't know how to handle PUBLIC Ids in the DOCTYPE:
>
><!DOCTYPE MYDTD PUBLIC "-//MYD//DTD My Report
>DTD:V0.16.6:MYDTD.DTD//EN">
>
>Results in an EXPAT error message: syntax error at line ...
>
>If I change 'PUBLIC' to 'SYSTEM' it works, but than an other program
>working with this XML-File crashed.

That's not a legal XML document type declaration (though it would be legal in SGML).  In XML, you 
need either PUBLIC followed by a public ID followed by a system ID (URI), or SYSTEM followed by a 
system ID.  You can't have just a public ID without a system ID.