Re: DTDs and other fun



On Thu, Jan 26, 2012 at 3:25 PM, Shaun McCance <shaunm gnome org> wrote:
> Ryan asked me to look at the DTDs for the menu markup and GtkBuilder
> interface definitions, since he merged everything over to GtkBuilder.
> Here's the old menumarkup.dtd:
>
> http://git.gnome.org/browse/glib/tree/gio/menumarkup.dtd?id=4e9f59bff8adc59fd8fde5bdee9879b8c3e4e55b
>
> And here's what our docs say the current GtkBuilder DTD is, though
> we don't have a separate DTD file.
>
> http://developer.gnome.org/gtk3/3.3/GtkBuilder.html#BUILDER-UI
>
> Issues:
>
> 1) The GtkBuilder DTD doesn't specify attribute types in ATTLIST
> declarations, so it's invalid.
>
> 2) You can't just use ANY anywhere to mean ANY. You either use ANY,
> or you use an element pattern.
>
> 3) If you use ANY, DTDs still try to validate those contents, and
> that just doesn't work because we can't specify every last element
> name somebody might use.
>
> In short, it is impossible to properly validate these files using
> DTDs. I've attached a DTD that will validate only those files that
> don't use any extensions. That at least serves as a sort of loose
> description of the format.

The fact that nobody ever reported the missing attribute types
probably shows you how important it is in practical terms for us to
ship a technically valid DTD...  nobody is using this dtd for
anything.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]