Is the UI Binder DocType Broken?

473 views
Skip to first unread message

Scott Onyx Harmon

unread,
Apr 28, 2020, 1:23:50 PM4/28/20
to GWT Users
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">

No longer seems to be functioning properly, as I now get multiple "errors" in my XML files such as:
Element type "ui:UiBinder" must be declared.

Is there a new place to get the DTD?

Michael Conrad

unread,
Apr 29, 2020, 8:57:35 AM4/29/20
to google-we...@googlegroups.com
I just accessed the URL directly in a browser and was prompted for an XML download. Connection issue of some sort?

Reading the header in the XML file it looks like they want you to use 'https://dl-ssl.google.com/download/gwt/DTD/xhtml.ent' instead.

And the master copy is at 'http://google-web-toolkit.googlecode.com/svn/trunk/user/src/com/google/gwt/uibinder/resources/xhtml.ent'

And looking through that file, I don't see UI Binder elements defined, only HTML entities.
--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/50b54519-f3fb-438d-82ad-fd9b8cdd07d8%40googlegroups.com.

Thomas Broyer

unread,
Apr 30, 2020, 7:09:07 AM4/30/20
to GWT Users
There's no DTD for UiBinder (because it's by essence impossible), and no XML Schema either (for similar reasons, though at least it would work well with XML Namespaces).
That DOCTYPE you have here is only there to declare named entities like you have in XHTML (&nbsp;, &eacirc;, etc.) rather than having to use numeric character references (&#160; or &#xA0; for a non-breaking space); it's basically a concatenation of those 3 files: https://www.w3.org/TR/xhtml1/#h-A2

BTW, the link works for me, and says exactly that:
<!--
  This is the complete set of named character entites defined in
  XHTML1.0.  Though this file was created for the convenience of users
  of the Google Web Toolkit, it should be useful for any XML
  document. It's essentially a union of:


    http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent
    http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent
    http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent


  Sample usage:
  <!DOCTYPE ui:UiBinder
    SYSTEM "https://dl-ssl.google.com/download/gwt/DTD/xhtml.ent">


  This file is maintained at
  <http://google-web-toolkit.googlecode.com/svn/trunk/user/src/com/google/gwt/uibinder/resources/xhtml.ent>. Changes
  made to it must be propagated to the URL in the sample above.
-->

The thing is, this file is now "maintained" at https://gwt.googlesource.com/gwt/+/refs/heads/master/user/src/com/google/gwt/uibinder/resources/xhtml.ent but hasn't changed in 10 years (just like XHTML 1.0 hasn't changed in 18 years). It won't change in the foreseeable future, and it is unlikely that the file hosted on Google servers will ever be updated.

Now, what are your options?

shaun....@jackpinetech.com

unread,
Aug 17, 2020, 11:33:44 AM8/17/20
to GWT Users
I can concur that I'm seeing the exact same issue in the latest (2020-06) version of Eclipse. I'm able to access the file via download, but it's not clear why Eclipse no longer thinks it's valid. My initial thought was an http vs https thing (like it wouldn't download the DTD over clear http), but even after changing to https, Eclipse still complained.

I can also confirm that either of the last 2 solutions above (reference one of the files from the W3C instead or reference all 3 files from the W3C with a "proper" DOCTYPE) fix the issue.
Reply all
Reply to author
Forward
0 new messages