digital-preservation / csv-schema

CSV Schema
http://digital-preservation.github.io/csv-schema
Mozilla Public License 2.0
98 stars 33 forks source link

Clarification: @optional means full, empty, or partially full? #23

Open mhGLEIF opened 5 years ago

mhGLEIF commented 5 years ago

Another trivial clarification, I'm afraid 🙁

I am using @optional currently in a csvs to mean a column may hold one of

Is that the intended meaning? It seems to be from the way the validator works?

It's not totally clear to me from the doc if a partially empty column is OK:

http://digital-preservation.github.io/csv-schema/csv-schema-1.1.html#column-definitions-examples

Is there a different directive for this?

DavidUnderdown commented 5 years ago

Testing is always row-by-row, so yes a partially empty column would be fine - @optional is effectively equivalent to adding "or empty" to your column test.

I see if I can think of some clearer wording.

mhGLEIF commented 5 years ago

Thanks for clarifying. So "column" is shorthand for "the cell in this column in this row". As I surmised.