GENERAL COMMENTS
- BE EXPLICIT ABOUT THE INTERCHANGE FILE FORMAT: I think the CSV file format is a good choice. However, to insure that all implementations of the interchange format are compatible, the spec needs to be quite explicit so that there is little room for incompatible interpretation of the field values.
- Numeric fields come in three possibilities: signed integers, unsigned integers and real numbers. Integers are exact but not all real numbers get interpreted in the same way on all platforms. This is a place where incompatibility can creep in.
- When an optional field is left blank, how will that appear in the CSV file? A string can be shown as two commas in a row, but what about a number or a timestamp? I would suggest that, when exporting, any value in the CSV that appears as two commas in a row be entered into the database as a NULL. When importing, and value with either ,, or ,"", be entered into the database as NULL. (NULL is a special value used in the database to explicitly indicate that the field contains no value.)
- Specify the maximum field size for all strings. This could be a blanket statement that applies to all strings in the CSV, but keep in mind that very long strings can cause implementation problems on some platforms.
- Specify both import behavior and export behavior. This is especially important for handling exceptions and creating a robust specification that tolerates variations in a predictable way. For example, if a database is being exported to the CSV interchange format and the required field "Camera letter" is NULL, specify that it be exported as the letter 'A'. If importing a CSV and the "Camera letter" is missing then specify that it be imported as the letter 'A'. The other option is to fail the import or at least skip that record. (A log of these exceptions should be generated so that someone can review the exceptions.)
- Date/time values very from platform to platform. When exporting a timestamp, with no time part, export it with a time of 00:00:00. When importing a timestamp with no time value, add a time value of 00:00:00.
- SEPARATE THE INTERCHANGE FILE FORMAT FROM INTERFACE: It is useful to keep the file format specification separate from user interface issues. You might even consider having two specs or two sections in this specification; one for the CSV file format and one for the interface requirements.
- USER INTERFACE SPECIFICATION: The fields in the spec with types "Multi-select" and "Enum" are really type string in the CSV file. "Multi-select" and "Enum" really only applies to how the user will specify the values to be entered in these fields. Required vs Optional fields are also principally about the user interface. If a CSV file is being imported into a database and does not have one or more of the required fields, then an error would be reported.
- FIELD RANGE CHECK: It may be useful to specify the range of values that are correct in a field. This could apply to numeric fields such as shutter angle, tilt angle, etc. Perhaps even camera letter should be constrained to be s single capital letter. Some range checks depend on data in other fields such as all that have the attribute "Required for stereo".
- DEFAULT VALUES: Should some fields have default values? For example the camera letter could default to 'A'.
- Where will the values be obtained for the various "Multi-select" and "Enum" field types? It is possible to put them into the CSV file using the same technique as you used for the takes (prefacing field names with tk) but that complicates things. This is where XML is much more flexible.