The markup declarations contained or pointed to by the document type declaration must be well-formed

So I'm using a library called libgdx for a java project. It has an autogenerated XML file which I have no idea what does. Suddenly this xml file returns an error which is:

"The markup declarations contained or pointed to by the document type declaration must be well-formed"

Having no idea what the xml file does or any deep knowledge of xml I'm completely stuck as to how to fix it. The XML code can be seen here:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "http://google-web-toolkit.googlecode.com/svn/trunk/distro-source/core/src/gwt-module.dtd">
<module>
    <source path="com/starship/security" />
</module>

Upvotes: 1

Views: 4430

Answers (2)

Seems like it's a bug in the 2.6 version og their DTD. What did the trick was replacing the second line with:

<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd">

Source: GWT - Module.gwt.xml - XML validation warning

Upvotes: 0

Seelenvirtuose
Seelenvirtuose

Reputation: 20648

The problem

The URL http://google-web-toolkit.googlecode.com/svn/trunk/distro-source/core/src/gwt-module.dtd does not point to a DTD file. I do not know whether it did before, but now you can see a redirection hint when simply calling this URL in your browser.

The redirection points you to the URL https://gwt.googlesource.com/gwt/+/master/./distro-source/core/src/gwt-module.dtd. However, under this URL you get a simple HTML page that displays the DTD. You do not get the DTD file itself.

So the error message is correct. The HTML page is not a valid DTD.

A solution

You must reference a valid DTD. Point.

A first simple approach - with which you also can check the behavior - would be to save this DTD to your local hard disk and reference it with

<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "file:///<absolute-path>/gwt-module.DTD">

In fact, I do not know whether this DTD is part of your project or whether it is maybe accessible in a more public place in the web. In the first case you can replace the absolute path with a project relative path. In the second case you must replace the whole URL.

Maybe you can troubleshoot on that last step yourself. I am (unfortunately) not familiar with GWT.

Upvotes: 1

Related Questions