The Overview entry helper displays in a tree structure the files that constitute the taxonomy (screenshot below). At the root of the tree is the main taxonomy file (the concept definitions file); this is the currently active file. The files on the next level are of two types: (i) linkbase files that specify the various relationships in the taxonomy; these are indicated by colored icons; and (ii) imported schemas (the .xsd files).
In the section, Importing a Taxonomy, you have seen how a taxonomy can be imported via the Overview entry helper. The imported taxonomy is listed among the imported schemas in the Overview entry helper.
In this section, we show how the Overview entry helper can be used to manage linkbase files. The four operations for managing linkbases are all accessed via the Overview entry helper's context menu. They are:
•Setting the linkbase kind. In cases where the linkbase type (calculation, definition, presentation, label, or reference) is not known to XMLSpy, the linkbase type can be explicitly specified.
•Setting a linkbase as the default linkbase for a particular type of relationship linkbase. If there is more than one linkbase for a particular type of relationship, say, label relationships, then new labels that you create in the Taxonomy Editor will be created in the default label linkbase.
|Note:||There are five types of relationships: (i) definition, (ii) calculation, (iii) presentation, (iv) label, and (v) reference. Separate linkbase files can be created for each of these relationship types.|
To add a new linkbase, do the following:
1.Right-click in the Overview entry helper and select Add New Linkbase | <relationship type>. A new linkbase file of the selected relationship type is created in the Overview entry helper with a default name. Note that the new linkbase is created as the default linkbase of its relationship type (indicated by the filename being in boldface).
2.Right-click the default name, select Rename, and edit the name.
3.A newly created linkbase file is physically saved at a particular location only when the main taxonomy file is saved the next time. See below for details.
If a linkbase file has not been saved, this is indicated by an asterisk after the name of the linkbase file. When you save the main taxonomy file, the following will happen:
1.The Confirm Linkbase Paths dialog appears. This dialog contains the names and locations (paths) of all the linkbases in the taxonomy, including the newly created linkbase files. Any unsaved linkbase file will have a default path to the folder in which the main taxonomy file will be, or has been, saved. You can edit the path of individual linkbase files if you wish to save a linkbase file to another location. You can also edit the name of the file.
2.Click OK when done. The linkbase files will be saved to the specified locations.
The linkbase kind of a file (also referred to as a file's linkbase type) can be set by using this command. Right-click the file for which the linkbase kind is to be changed, and, from the context menu, select the command Set Linkbase Kind | <relationship type>. The All option enables you to specify that the linkbase file can contain more than one kind of relationship.
A default linkbase file can be set for each relationship type. When a relationship of that type is defined in the Taxonomy Editor, the relationship is saved to the default linkbase file of that relationship type. To set a linkbase file as the default linkbase, right-click it and select Set Default Linkbase. The names of default linkbases are displayed in bold.
A linkbase can be removed from the taxonomy by right-clicking it and selecting Remove.
Example file: Step 4
The taxonomy we are creating already has linkbase files. These were created when the taxonomy was created with the New Taxonomy Wizard. The original default names were changed to the following:
•Calculation linkbase: nanonull_cal.xml
•Definition linkbase: nanonull_def.xml
•Label linkbase: nanonull_lab.xml
•Presentation linkbase: nanonull_pre.xml
In order to test some of the commands introduced in this section, do the following: Create a linkbase file by using the Add New Linkbase command and creating any linkbase kind you like. Rename it as described above. Notice that the newly created linkbase becomes the default linkbase of its relationship type (indicated by its name being displayed in bold). Select it and set it to be some other relationship type (using the Set Linkbase Kind command). Notice that the file is not the default linkbase of its new relationship type. Now delete the linkbase (using the Remove command). Since one of the original linkbase files is now no longer a default linkbase, set a file of that relationship type as the default linkbase of its relationship type.
In the next step, we will add new elements to the main taxonomy file (or concept definitions file).