Menu Spec: including files & absolute paths

Mark McLoughlin markmc at redhat.com
Tue Mar 22 13:21:56 EET 2005


On Mon, 2005-03-21 at 22:02 +0100, Waldo Bastian wrote:
> On Monday 21 March 2005 18:12, you wrote:

> > 	Perhaps we should drop the "stop processing on unknown" part, allowing
> > implementations to just pass through unknown elements/attributes if they
> > don't do full DTD validation?
> 
> Yes, because it makes future extensions impossible. 

	Well, it doesn't really. As long as the menu file references the
correct version of the DTD, it will remain valid even if we add
extensions to later version. This is suggested down the page a little
with

"
All menu files MUST include the document type declaration, so that
implementations can adapt to different versions of this specification
"

	The problem for us is that we don't actually validate against the
actual DTD specified in the menu file, but our own notion of the DTD,
which is clearly broken.

	All fairly academic if the DTD isn't on the website, though :-)

> Suggest to change 
> 
> "implementations are expected to stop processing if they encounter XML
> elements or attributes that are not specified in this document."
> 
> to
> 
> "In order to make extension of this specification possible in the future, 
> implementations are expected to ignore any XML elements or attributes that 
> are not specified in either the DTD or this document."

	So, I suggest

"
Menu files must be well-formed XML files and end in the extension
".menu". They should also conform to the menu file DTD which implies
that implementation-specific extensions to the file format are not
allowed. Implementations may stop processing if they encounter a menu
file which does not comply with the associated DTD.
"

	i.e. if an implementation validates against the DTD specified in the
menu file, then they're within their rights to barf if the file doesn't
validate.

> I also note that it says "System Identifier for 0.8" while the spec is at 
> revision 0.9 and soon 1.0, I guess we should update that to match the actual 
> version?

	Yep, maybe make the version number an entity at the top of the file so
it only needs to be changed once in future.

Cheers,
Mark.




More information about the xdg mailing list