tw_tax_import utility enables you to import custom taxonomy files into the current taxonomy.
You no longer need to restart any services after running a taxonomy import using this utility.
Taxonomy definitions are configured using .xml files that are stored in the following directories:
The directories are parsed in the order shown (installed files take precedence over custom files), and the files contained in these directories are parsed in alphabetical order (numbers before letters). This order is important, because any taxonomy definitions that are subsequently added override any previously loaded definitions. The standard base taxonomy file is contained in
There are advanced ways that the taxonomy can be updated, however you should follow these guidelines:
Create custom files with a sensible naming convention, for example,
001myextensionname.xmlso that they are loaded in the correct order.
- Remember to add a <mode>merge</mode> tag in your extension file.
- Load all files using the following command:
In almost all circumstances you should not need to supply any additional parameters.
For reference, a full set of options is shown below.
Command Line Option
|Check the validity of the XML files and exit.|
Ignore any broken extensions. If a taxonomy extension is invalid, the importer ignores it and attempts to load all other extensions. Where the taxonomy importer fails to load an extension it logs a message to stderr. This option cannot be used with the files command. It is primarily intended for upgrading, but it can be used from the command line.
Specify a list of files to load.
In the following example, type the command on a single line.
Importing customized taxonomy definitions
The following example illustrates how to import a custom taxonomy file and merge the imported data into the existing taxonomy.
You need to define the attributes to show in a taxonomy extension, for example:
Save this in an extension, for example,
/usr/tideway/data/custom/taxonomy/01baisummary.xmland you can import all the taxonomy using:
tw_tax_import reports errors if there are invalid tags or references to undefined attributes.