Re: detecting file type by magic number


Subject: Re: detecting file type by magic number
From: Paul Rohr (paul@abisource.com)
Date: Thu Jan 20 2000 - 23:21:30 CST


At 02:37 PM 1/20/00 -0600, sterwill@abisource.com wrote:
>Kevin Vajk wrote:
>> sterwill suggested something like: <!doctype ...>
>> leonardr suggested something like: <?xml version="1.0"?>
>
>I think Leonard knows more about it than I do, but surely that's
>exactly what the <?xml?> tag is for, right? We should use it,
>even if we have to give it a pseudo-complete DTD reference.

Here's the relevant section of the XML spec:

  http://www.w3.org/TR/REC-xml#sec-prolog-dtd

I'd like to suggest that whoever submits patches in this area understands
enough XML to confirm that our documents do indeed conform to the 1.0
version of the spec, before adding a tag which claims we do. ;-)

As for doctypes, they seem like a hindrance to sniffers, rather than a help.
(Check the blue examples to see what I mean.) AFAICT, doctypes are only
useful for apps which use DTDs, and I doubt we ever will bother to do so.
However, there are other apps which do, so if anyone is jumping up and down
with sheer eagerness to produce and maintain a reliable DTD which accurately
describes what our importer and exporter do, more power to you. In that
case, the polite thing to do would be to add a doctype declaration to
reference it.

However, since our source is both definitive and available, I'm not going to
lose any sleep over the lack of a DTD.

In this case no information is definitely preferable to wrong information.

Paul



This archive was generated by hypermail 2b25 : Thu Jan 20 2000 - 23:16:23 CST