grub-devel
[Top][All Lists]
Advanced

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

Re: [RFC] Redesign of the menu system


From: Michal Suchanek
Subject: Re: [RFC] Redesign of the menu system
Date: Wed, 19 Aug 2009 17:17:48 +0200

2009/8/19 Bean <address@hidden>:
> On Wed, Aug 19, 2009 at 10:30 PM, Vladimir 'phcoder'
> Serbinenko<address@hidden> wrote:
>> On Wed, Aug 19, 2009 at 4:22 PM, Bean<address@hidden> wrote:
>>> Hi,
>>>
>>> Some clarification about the XML/CSS format:
>>>
>>> First of all, the internal representation of component is tree-like
>>> structure, which is quite natural to XML, we can create the tree while
>>> parsing. Besides, we don't need to implement the full specification of
>>> XML/CSS, just a subset that works for us.
>>>
>>> And as stated previously, XML/CSS is not the only interface. It's
>>> primarily used for normal user. As XML/CSS is wildly used, user can
>>> open the configuration file and get a general idea of what's it about.
>>> But for advanced users, he may decide to configure the menu in
>>> grub.cfg, in this case, XML is definitely not suitable as it conflicts
>>> with existing syntax, and the {} syntax would be fine.
>>>
>> The problem of XML/CSS is that they can't be modified on the fly by
>> commands from shell. You need to have an OS booted to do that. Because
>> of that I see no benefit from supporting XM in grub itself. If you
>> want to allow menu interface creation with XML+CSS which can be good
>> thing you can create a converter running in userspace and this way you
>> can reuse existing XML and CSS libraries. Then in grub the resulting
>> format can be loaded using "source" command
>
> Hi,
>
> XML/CSS is only used for the represent of initial layout, you can
> manipulate the tree after it's created. For example:
>
> # Add static content
> load_xml menu.xml
> # Add dynamic content
> ...
>
> It's like using html for page layout, and javascript for interaction.
> There is no conflict between the two.
>
> About the converter, it could cause more trouble than it solves.
> XML/CSS can be written using plain text editor. while the converter
> needs to be compiled or  depend on other program, and it needs to be
> rerun every time XML/CSS is changed, this could be quite troublesome.

{} block syntax is also widely used and much easier to read and write
by humans than XML+CSS.

I do not see the reason for pushing XML/CSS everywhere. It's a
compromise that does not quite work for neither of visual formatting,
other media formatting, automatic parsing nor user readability.

While you can add additional properties that make it specific enough
for grub to know what to do (and drop things that grub would not use)
it is no longer really XML/CSS and the familiarity could be even
misleading.

XML/CSS was created for the web but does not work even there because
it is unclear, underspecified, and does not solve problems of media
representation description that any decent menu system will want to
solve.

Given that using XML/CSS is contradicting your goal of extensibility.

Thanks

Michal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]