GNOME Bugzilla – Bug 791267
[PATCH] Make gschema.dtd usable.
Last modified: 2017-12-06 10:36:59 UTC
Created attachment 365026 [details] [review] Make gschema.dtd usable. I’m quite sure gschema.dtd is only use for documentation, but it would be great to be able to copy it inside an actual gschema and have it work. The “<” mathematical operator in a comment makes that impossible for now. Also, range “min” and “max” value can be equal (see “/ca/desrt/dconf-editor/Demo/weird-range”). And you can have only one of the two, but I don’t know how to put that in the DTD.
Review of attachment 365026 [details] [review]: If you’ve got any other changes to gschema.dtd, please attach them all as patches to the same bug report rather than opening more bug reports. It reduces the amount of e-mails everyone gets. :-) (In reply to Arnaud B. from comment #0) > Also, range “min” and “max” value can be equal (see > “/ca/desrt/dconf-editor/Demo/weird-range”). And you can have only one of the > two, but I don’t know how to put that in the DTD. I don’t think that’s expressible in DTD. It might be possible if the schema were rewritten in RelaxNG. Since RelaxNG’s compact syntax is generally a lot more readable than DTD, I would happily accept a patch which rewrote the schema in RelaxNG. If you do that, please submit one patch which rewrites the schema to RelaxNG *without changing its semantics at all*, and subsequent patches which tighten or correct the semantics in RelaxNG. ::: gio/gschema.dtd @@ +49,3 @@ <!ELEMENT range EMPTY > +<!-- min and max must be parseable as values of the key type and --> +<!-- min less-than or equal to max --> Make this a multi-line comment rather than two single-line comments. For example: <!-- min and max must be parseable as values of the key type, and min must be less than or equal to max -->
Created attachment 365029 [details] [review] Make gschema.dtd usable. (In reply to Philip Withnall from comment #1) > If you’ve got any other changes to gschema.dtd, please attach them all as > patches to the same bug report rather than opening more bug reports. It > reduces the amount of e-mails everyone gets. :-) Yeps, sorry with the double bug, I had the time to lose hope in making this work. > (In reply to Arnaud B. from comment #0) > I would happily accept a patch which rewrote the schema in RelaxNG. Not interested enough for now in the rewrite. But I keep that idea in memory.
Review of attachment 365029 [details] [review]: ++
Comment on attachment 365029 [details] [review] Make gschema.dtd usable. Pushed to master and glib-2-54 with some rewording of the commit message to drop the trailing full-stop and make the title less generic. 2ebc78ae7 (HEAD -> master, origin/master, origin/HEAD) gio: Remove stray ‘<’ from gschema.dtd 5f3f830fc (HEAD -> glib-2-54) gio: Remove stray ‘<’ from gschema.dtd