Re: Menu Editing - phase 1



Glynn Foster wrote:

Some comments below.  Could probably do with a little less indenting :)

<!-- This is the root element -->
<!ELEMENT	VFolderInfo	(MergeDir*, ItemDir?, UserItemDir?, DesktopDir, UserDesktopDir?, Folder, ReadOnly) >

<!-- Optional directories of .desktop files -->
<!ELEMENT	MergeDir	(#PCDATA) >

<!-- Used to override the default location of .desktop files -->
<!-- with /usr/share/applications being the default          -->

<!ELEMENT	ItemDir		(#PCDATA) >

<!-- Used to override the default user location of .desktop files -->
<!-- with $(HOME)/.gnome/vfolders being the default               -->

<!ELEMENT	UserItemDir	(#PCDATA) >

<!-- Specifies the location of the .directory files -->

<!ELEMENT	DesktopDir	(#PCDATA) >

<!-- Specifies the location of the user .directory files -->

<!ELEMENT	UserDesktopDir	(#PCDATA) >

<!ELEMENT	Folder		(Name, Desktop, Include*, Exclude*, Query, OnlyUnallocated?, DontShowIfEmpty?, ReadOnly, Folder*) >

On my system, applications.vfolder-info puts some Exclude elements after the Query elements (which would fail to validate with this DTD. Do we want to place this ordering restriction on vfolder-info files? If so, should the existing files be made to match the DTD, and should the code that reads vfolder info files enforce the ordering?

DTDs don't seem to be very good at allowing arbitrary ordering and ensuring only 0/1 of a particular element.


<!-- Name of the menu item -->

<!ELEMENT	Name		(#PCDATA) >

<!-- Name of the .directory file -->

<!ELEMENT	Desktop		(#PCDATA) >

<!-- Include specific .desktop files -->

<!ELEMENT	Include		(#PCDATA) >

<!-- Exclude specific .desktop fiels -->

<!ELEMENT	Exclude		(#PCDATA) >

<!-- Not entirely sure -->

<!ELEMENT	OnlyUnallocated EMPTY >

<!-- Don't show menu item if there is no sub-entries -->

<!ELEMENT	DontShowifEmpty EMPTY >

<!-- Query monkey magic -->

<!ELEMENT	Query		(And | Or | Not) >

<!-- Logical operators -->

<!ELEMENT	And		(Keyword*, (And | Or | Not)*) >
<!ELEMENT	Or		(Keyword*, (And | Or | Not)*) >

These two should probably have "(Keyword | And | Or | Not)+" as the child list. (I assume you can have these elements in any order).

<!ELEMENT	Not		(Keyword*, (And | Or | Not)*) >

A Not element should have one child, so the child list should probably be "(Keyword | And | Or | Not)".


<!-- This must correspond to the Categories field in the .desktop file -->

<!ELEMENT	Keyword		(#PCDATA) >

<!ELEMENT ReadOnly EMPTY


--
Email: james daa com au              | Linux.conf.au 2003 Call for Papers out
WWW:   http://www.daa.com.au/~james/ |   http://conf.linux.org.au/cfp.html







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