/*  The Name in the document type declaration must match the element type of the root element.  */
void xmlParseDocTypeDecl(xmlParserCtxtPtr ctxt)
/*  The Name in the document type declaration must match the element type of the root element.  */
void xmlParseDocTypeDecl(xmlParserCtxtPtr ctxt)
{
	xmlFatalErrMsg(ctxt, XML_ERR_NAME_REQUIRED,
		       "xmlParseDocTypeDecl : no DOCTYPE name !\n");
    }
    ctxt->intSubName = name;
    SKIP_BLANKS;
    URI = xmlParseExternalID(ctxt, &ExternalID, 1);
    if ((URI != NULL) || (ExternalID != NULL)) {
        ctxt->hasExternalSubset = 1;
    }
    ctxt->extSubURI = URI;
    ctxt->extSubSystem = ExternalID;
    SKIP_BLANKS;
    if ((ctxt->sax != NULL) && (ctxt->sax->internalSubset != NULL) &&
	(!ctxt->disableSAX))
	ctxt->sax->internalSubset(ctxt->userData, name, ExternalID, URI);
    if (ctxt->instate == XML_PARSER_EOF)
	return;
    if (RAW == '[')
	return;
    if (RAW != '>') {
	xmlFatalErr(ctxt, XML_ERR_DOCTYPE_NOT_FINISHED, NULL);
    }
    NEXT;
}