You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Susan Collins <sc...@itdesign.ie> on 2000/04/07 13:00:54 UTC

org.xml.sax.SAXParseException: White space is required after "
Hi

I'm getting the following error:
	org.xml.sax.SAXParseException: White space is required after "<!DOCTYPE" in
the document type declaration.
	(Line Number: -1)
	(Column Number: -1)

when I call the DTDValidator.scanDoctypeDecl(boolean) function.

There had been some errors in the DTD and XML files, which were reported and
manually fixed, but this fatal error is still occuring.
Anyone any ideas why it is doing this?

The code is:
	try {
		DOMParser p = new DOMParser();
		p.setFeature("http://xml.org/sax/features/validation", true);
		p.setValidating(true);
		WorkflowModelErrorHandler errorHandler = new WorkflowModelErrorHandler();
		p.setErrorHandler(errorHandler);
		p.parse(new InputSource("g:/WorkflowModel.xml"));
		doc = p.getDocument();
		org.apache.xerces.utils.StringPool stringPool = new
org.apache.xerces.utils.StringPool();
		DTDValidator dtdV = new DTDValidator(p,stringPool,p,p);
		dtdV.scanDoctypeDecl(true);

	} catch (SAXException saxE) {
		//Error Handling here
		System.err.println(saxE.getMessage());
	}

and there is a space after the <!DOCTYPE :
	<?xml version="1.0" standalone="no"?>

	<!DOCTYPE MODEL SYSTEM "G:/WorkflowModel.dtd">

	<MODEL ID="MyModel">
	.......

Thanks

Susan