You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: csv-schema-1.0.html
+22-15Lines changed: 22 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -1633,43 +1633,50 @@ <h2>Identifiers</h2>
1633
1633
<section>
1634
1634
<h1>Errors and Warnings</h1>
1635
1635
<p>
1636
-
Running the validator will produce a report. First of all the validator checks that the schema itself is syntactically correct. If not, a <a>Schema Error</a> is produced,
1637
-
and no validation of the actual data occurs. If the schema check is successful then data validation begins. A report is produced for each <a>Column Validation Expression</a>
1638
-
that fails validation. This is generally considered a <a>Validation Error</a>, unless the <a>Warning Directive</a> has been used to convert errors within that
1639
-
<atitle="Column Rules">Column Rule</a> into a <a>Validation Warning</a>.
1636
+
An implementation MUST first check that the provided CSV Schema(s) are syntactically correct. If not, a <a>Schema Error</a> is produced,
1637
+
and no further validation SHOULD of the CSV Schema(s) or provided CSV files(s) should be undertaken. If the schema check is successful then an implementation
1638
+
MAY continue with further CSV Schema(s) and CSV file validation.</p>
1639
+
<p>If an implementation performs validation of a CSV file against a CSV Schema, a report SHOULD be produced for each <a>Column Validation Expression</a>
1640
+
that fails validation; This is generally considered a <a>Validation Error</a>, unless the <a>Warning Directive</a> has been used reduce the severity of an error within a specific
1641
+
<atitle="Column Rules">Column Rule</a> to a <a>Validation Warning</a>.
1640
1642
</p>
1641
1643
<section>
1642
1644
<h2>Schema Errors</h2>
1643
1645
<p>
1644
-
A <dfn>Schema Error</dfn> is caused by syntax errors in the definition of the schema itself. This might be an incorrect <a>Version Declaration</a> or a mismatch between the
1646
+
A <dfn>Schema Error</dfn> is caused by syntax errors in the definition of the CSV Schema. These might include for example: an incorrect <a>Version Declaration</a>, or a mismatch between the
1645
1647
number specified for <a>Total Columns Directive</a> and the actual number of <atitle="Column Definition">Column Definitions</a> given in the <a>Body</a> of the Schema.
1646
1648
Schema Errors would also be produced by mismatched <atitle="Parenthesized Expression">Parenthesized Expressions</a>,
1647
1649
unrecognised <atitle="Column Validation Expression">Column Validation Expressions</a> and <atitle="Explicit Context Expression">Explicit Context Expressions</a> which do not
1648
1650
match an actual <a>Column Identifier</a>.
1649
1651
</p>
1650
1652
<p>
1651
-
The Schema Error will be logged in the output report, and execution will terminate without attempting to validate the data against the schema.
1653
+
An implementation MUST report a Schema Error.
1652
1654
</p>
1653
1655
</section>
1654
1656
<section>
1655
1657
<h2>Validation Errors</h2>
1656
1658
<p>
1657
-
If column data does not validate successfully against a <atitle="Column Rules">Column Rule</a>a <dfn>Validation Error</dfn> will be produced and logged in the output report.
1658
-
In general a Validation Error does not terminate execution, all data will be processed, and all errors logged. When Validation Errors have been encountered the validator will
1659
-
give a non-zero return code TODO specify. The <a>Warning Directive</a> may be used within a Column Rule to specify that what would normally be a Validation Error should be
1659
+
If column data does not validate successfully against a <atitle="Column Rules">Column Rule</a>, an implementation SHOULD report a <dfn>Validation Error</dfn>.
1660
+
It is implementation defined whether a Validation Error terminates execution, or whether execution continues. If execution continues, any further errors SHOULD be reported.</p>
1661
+
<p><b>NOTE</b> The <a>Warning Directive</a> may be used within a Column Rule to specify that what would normally be a Validation Error should be
1660
1662
treated only as a <a>Validation Warning</a>.
1661
1663
</p>
1662
1664
<p>
1663
1665
A <dfn>Validation Warning</dfn> can be used when you wish to highlight unexpected values that are encountered in the data, but for some reason they are not to be considered
1664
-
failures of validation. For example within archival documents the date has been recorded as an "impossible" date such as 30 February or 31 April. A transcriber has correctly
1665
-
entered the data as seen on the original document, but it is not a valid date. You may wish to highlight these cases for additional QA, but it cannot be considered an error.
1666
+
failures of validation. For example within archival documents the date may have been recorded as an <em>impossible</em> date, such as 30 February or 31 April. A transcriber has correctly
1667
+
entered the data as seen on the original document, but yet it is not a valid date. You may wish to highlight these cases for additional QA, but it should not be considered an error.
1666
1668
</p>
1667
1669
</section>
1668
1670
</section>
1669
-
1670
-
TODO a note on file uri handling on different platforms etc!
1671
-
TODO a note on mime-type and file-naming .csvs
1672
-
1671
+
<sectionclass="appendix">
1672
+
<h2>The text/csv-schema Media Type</h2>
1673
+
<p>This Appendix specifies the media type for CSV Schema Version 1.0. CSV Schema is a language for describing and validating CSV files, as specified in the main body of this document. This media type has being submitted to the IESG (Internet Engineering Steering Group) for review, approval, and registration with IANA (Internet Assigned Numbers Authority.)</p>
1674
+
<p>The <code>text/csv-schema</code> media type, is intended to be used for transmitting schemas written in the CSV Schema language.</p>
1675
+
<section>
1676
+
<h3>File Extensions</h3>
1677
+
<p>The suggested file extension for use when naming CSV Schema files is <code>.csvs</code>.</p>
0 commit comments