Re: Media Type "text/csv": new draft (-02) and Last Call

Graham Klyne wrote:
At 01:14 23/03/05 -0500, Yakov Shafranovich wrote:
Clyde,
Thanks for pointing this out. I personally think that instead of making the header record mandatory which is something that most CSV applications do not have, I would rather take the comma out of the end of the record and have the last field end with a CRLF instead of an optional COMMA. Do you think that is a plausible solution?
No. Some of the Excel data I process has trailing commas. This must be allowed.
The main intent of the document is focusing on the MIME type. The CSV common definition is an attempt at a single tight definition of the CSV format to go along with the MIME type. I don't think that every application is compliant with it but the interoperability considerations section does mention that implementors should be aware of divergent implementations.
I also don't think it's necessary to say anything (other than maybe as a comment) about any special status for the first line: such use is accommodated quite reasonably within the basic CSV format.
For example, having such a line when exporting Excel as CSV depends entirely upon how the user constructs the original spreadsheet. Column headings are common, but not mandatory. In some cases, there may be a more complex heading structure -- this is an application issue, not a dataset format issue, and as such does not belong in the dataset format specification.
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. Yakov

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.

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
participants (2)
-
Bruce Lilly
-
Yakov Shafranovich