While refactoring the CSVelte\Taster class into CSVelte\Sniffer, I began trying to implement a method within the header sniffer to try to detect how many header rows there likely were. Then it occurred to me how complex it would be to support multiple headers. This is a feature best saved for much later, only after the most important features have been implemented.
But when I do decide to implement multiple headers, if I do:
I will need a way to sniff a file to figure out how many headers there likely are
I will need to be able to specify which of the multiple headers represents the column headers
I will likely need to be able to support differing numbers of columns for headers since some headers aren't really columnular data at all.
Will need to have a functional CSVelte\Dialect::$headerRowCount property
While refactoring the
CSVelte\Taster
class intoCSVelte\Sniffer
, I began trying to implement a method within the header sniffer to try to detect how many header rows there likely were. Then it occurred to me how complex it would be to support multiple headers. This is a feature best saved for much later, only after the most important features have been implemented.But when I do decide to implement multiple headers, if I do:
CSVelte\Dialect::$headerRowCount
propertyFor more on this, see the CSVW documentation: https://www.w3.org/TR/tabular-data-primer/ As well as this issue on CSVW conformance within this library: https://github.com/nozavroni/csvelte/issues/28