Xuse User Guide: CSV glossary import

This feature allows the bulk import of glossary terms from a CSV file. This is typically useful if your glossary is already defined in an existing artefact where it is easy to convert into CSV format.

Note: this feature is only available in Xuse version 01.00.x

CSV import

The CSV glossary import command imports a CSV file and creates a Xuse compatible XML equivalent. The CSV import function only allows the creation of a complete glossary document specifically it does not allow merge, append or other similar import functions.

The import file name defaults to PROJECT_DIR/src/resources/glossary-import.csv and the result is saved to PROJECT_DIR/src/resources/glossary-import.xml, however the default value can be overridden by specifying the appropriate properties.

Note: the import function will overwrite the file specified by the xuse.glossary.import.result property. Please make sure you have backed up (or version controlled) your work prior to running this command.

CSV Format

The table below describes the format of the CSV file. In all cases the column order is not important. The most important thing is that the columns are labelled correctly. For CSV import this is used in the mapping process; column labels should be on the first (header) row of the CSV file. For further details of the purpose of each field please see the glossary guide.

Note: to escape text please use normal " (quotation) marks. If you wish to use quotation marks within the text to be imported these should be escaped using a preceding quotation mark e.g "". Thus a line of CSV might look like:

ABBR,"Title with, a comma", "Description with a ""quote"""

An example CSV file can be downloaded here...

Column Card.* Mapping Comments
ABBREVIATION 0..1 xuse:entry/xuse:abbreviation Abbreviation for the glossary term (if relevant)
TITLE 1 xuse:entry/xuse:title The title for the glossary term.
DESCRIPTION 0..1 xuse:req/xuse:description A more meaningful description of the glossary term.

* - represents the number of columns expected in the import file.