[Top][All Lists]

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

Re: [RFC] Redesign of the menu system

From: Bean
Subject: Re: [RFC] Redesign of the menu system
Date: Wed, 19 Aug 2009 22:44:47 +0800

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


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.


gitgrub home:
my fork page:

reply via email to

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