Menu Specification Comments

Heinrich Wendel sysop at heinospage.de
Sun Jun 15 18:04:26 EEST 2003


On Sunday 15 June 2003 12:26, Havoc Pennington wrote:
> On Sun, Jun 15, 2003 at 08:37:06AM +0200, Heinrich Wendel wrote:
> > I said it needs a !unique! root element. Menu is not a unique
> > element. It can (and does in most cases) appear multiply times in a
> > .menu file.
>
> Ah, I see. I guess we have to add <useless-stupid-root-element>
> element then. I will ask Liam or Daniel to explain why that is in the
> XML spec. ;-)
>
> > > I don't understand this comment. The spec is fully recursive; nothing
> > > has global scope AFAIK.
> >
> > Yes, I would add a global scope (which can be defined in the root
> > element) and drop the recursive part. If a menu needs additionally
> > .desktop/.directory elements, it can also have it's local scope.
>
> Why? The implementation is much cleaner if things are just
> recursive. I don't see any value to special-cased global stuff at
> all. (Things in the outermost/root <Menu> are already global; there's
> no sense in which something could be "more global" than that.)
> An implementation just has a tree of objects representing <Menu> and
> things just work.

It would be more clear and easier to implement I think, if we would have a 
global scope and local scope. Furtheremore there seems not to be a note about 
the recursiveness in the spec, so at first I just thought there is only a 
local scope.

>
> > Can "And, Or, Not" contain instances of themselves? So is
> > <And><Or></Or></And> possible?
>
> Yes, though some such combinations are not useful.
>
> Havoc
Heinrich :)

> _______________________________________________
> Xdg-list mailing list
> Xdg-list at freedesktop.org
> https://www.redhat.com/mailman/listinfo/xdg-list




More information about the xdg mailing list