CSV2TEI.xsl

Summary
This stylesheet takes a comma-separated-values file and converts it to a basic TEI table structure.

Add any comments to the 'discussion' tab.

Required Input
Using Saxon 8 or above use it as:

saxon -it main styesheet.xsl input-uri=filename.csv

So input can be any file resembling: This,is,a,test,only,a,test! This, is a, variation, on a, test! "This","is","another","variation." It is an XSLT2 stylesheet and requires an XSLT2 processor such as Saxon8

Expected Output
The output is a TEI table with table, rows and cells but nothing else which can then be cut-and-pasted into a TEI document. For example, with the above input, the output should be:

Known Restrictions or Problems
Note: are removed. parameter output is converted to UTF-8.
 * It assumes cells are comma separated and rows are on individual lines
 * If surrounded in double-quotes, it will remove them.
 * It normalize-spaces the individual cell contents so leading/trailing spaces
 * It assumes things are in UTF-8 but this can be changed with the encoding
 * It is an XSLT2 stylesheet and requires an XSLT2 processor such as Saxon8

Stylesheet


   

  

