Chapter 10. Moving XML Files Between Releases and Installations

Table of Contents

Introduction To Moving XML
XML Default Values Files
Porting Older XML Files

Introduction To Moving XML

The WACS system provides a number of ways of moving all kinds of types of data between installations using files created in eXtensible Markup Language - XML for short. This includes both actual data that forms part of the working data set of a server and configuration data for the server. In general the process is fairly simple, but there are always issues between different versions of WACS as things do change between releases and over time. In this chapter, we will discuss some of the issues related to how to move data between either different servers or different versions of the WACS programs. The steps and concepts themselves are pretty much the same.

XML Default Values Files

The WACS distribution currently comes with four XML files containing default values for some of the main database tables. These are:

Table 10.1. XML Defaults files in WACS

TablenameDefaults FilePurpose
attribattrib.xmlThese are the various attributes that can be assigned to a set or model - introduced in Wacs 0.8.5
vendorvendors.xmlSome sample vendor details for major internet sites
photographerphotographers.xmlSome sample photographer details taken from major internet sites
keywordkeywords.xmlA good working set of English language keywords with scores and attributes


Porting Older XML Files

In WACS release 0.8.6 the code that previously read the defaults XML files for each database table was merged into a new single data population utility called wacspop. This replaced the previous separate populator commands: vendpop, keywordpop and photpop and obviated the need for the creation of a new command for handling the new attributes schema. With this move, it became necessary for each XML file to better identify what it actually was. It was therefore decided to add three extra attributes into each file, very similar to those already used by the data exchange XML files created by wacsexport, wacsxmlout and wacsselout.

Three new attributes were added to the database population XML files:

Table 10.2. Required XML Entities

XML EntityValue
versionnormally WACS_POPULATE_VERSION_1
coreschemaThe appropriate schema name: attrib, vendor, photographer or keyword.
revisiondateThe date this revision was created in DD-MON-YYYY format

If you wish to convert an older file to the new format so that it can be imported by wacspop, you merely need to add these three values near the top (typically third line) of your XML file using a normal text editor.

 [...]
 <version>WACS_POPULATE_VERSION_1</version>
 <coreschema>vendor</coreschema>
 <revisiondate>29-MAY-2011<revisiondate>
 [...]

Once this has been done, wacspop should import your XML file taken from a previous release of Wacs. Do be aware however that moving an older file to a newer release will not populate the new fields added for Wacs 0.9.0 and these fields will remain empty. It is an intended future upgrade for wacspop that it should be able to update records as well as just add any that are not currently there.