Generating XML Topic Maps

You can use the Validator just to automatically generate XTM documents, if you have a suitable schema.

1. From the Validator, click on the Options button.

 

2. The Options box will appear, opened at the Configuration tab. Select Generate XTM.

3. Click on Save if you want this XTM processing to be the default configuration for future sessions. Click on OK to accept the changes for this session and return to the Options box. If you want to exit without making XTM the default configuration, just click on Cancel.

Now when you press Run in the main window, the data files will be processed against the Schematron schema to generate XTM files which link to the orginal data.

The resulting XTM comes up as a list which can be viewed one at a time in the viewer. You can make minor edits to the XTM in the viewer, cut (using Ctrl-c) and paste (using Ctrl-v), print (using the Print button or Ctrl-p), and save (using the Save button Ctrl-s) each result.

Customizing the XTM Generator

There are several ways to customize the XTM processing.

  • First, the schema you use will determine which patterns are detected in the XML. These patterns are translated into XTM statements. So the improvement relates to which information in your XML date files is annotated as XTM, you should edit the schema.
  • Second, you might want to concatenate all the resulting XTM into a single file, rather than have the XTM all appear in separate windows. However, you may need to clean up the resulting data a little using the basic but convenient editing functions provided.
  • Third, you may wish to view the result as an XML tree.
    • 1. From the Options box, click the Settings button of the Generate Topic Maps radio button.
    • 2. Select the Browser option from the "View" section on the right. Add a comment in the comment field so that you will remember what this configuration is for.
    • 3. Click on Save if you want this setting to be available in future sessions. Click on OK to accept the changes for this session and return to the Options box. If you want to exit without using this XML setting, just click on Cancel.
  • You may wish to generate different XML. In this case, you need to create your own XSLT script to use instead of schematron-tm.xsl which is in the script directory. It is probably easiest to copy that script under a new name, and customize it, so that schematron-tm.xsl is always the name of the script delivered by Topologi.
    • 1. From the Options box, click the Settings button of the Generate Topic Map radio button.
    • 2. Type in the filename of the new script you want to use in the "Engine Script" field from the "Configuration" section in the middle of the box. Add a comment in the comment field so that you will remember what this configuration is for.
    • 3. Click on Save if you want this setting to be available in future sessions. Click on OK to accept the changes for this session and return to the Options box. If you want to exit without creating an XTM setting, just click on Cancel.

You are now back at the Options box. Click on Save if you want this XTM processing to be the default configuration for future sessions. Click on OK to accept the changes for this session and return to the Options box. If you want to exit without making Topic Map the default configuration, just click on Cancel.

Next topic >>