
Bruce Lilly wrote:
On Wed March 23 2005 09:18, Yakov Shafranovich wrote:
Hmm... I do think that probably every single spreadsheet program I have seen uses the optional header format so it is pretty common. Since I am trying to document a common format to go along with the MIME type, something that common deserves to be documented. As for more complex cases of headers, as you have said those can be easily accomodated within the basic format while omitting the initial header line used by spreadsheets.
How does a processor of the MIME type determine whether or not an optional header is in the media?
Making the header mandatory would obviate the question (generators can supply a line with all null fields).
A parameter indicating presence or absence of a header line (and possibly other format variations) could be defined. If optional, defaults would have to be specified in case the parameter is not specified.
The processor doesn't know that. But then again how does the processor know what each field means anyway? IMHO, it seems that any processor that works on CSV files is already somewhat aware of the CSV format that they are using, i.e. what each field is, header and no header. I don't know whether making the header mandotary or adding an optional parameter would help things, it just make things more complicated than they are now. My original intent was simply to register one single MIME type for CSV since multiples are used now and include a common CSV format which would be reasonably simple. Another alternative to make it even more simpler, would be to get rid of the header all together and leave it up to the application to figure it out as suggested by someone earlier. Yakov