From tauXSchema

Main: TestCase3

This tutorial describes how to run one of the more complicated test cases that comes with the standard distribution.

Scenario: We have created some documents that keep track of our company. We keep track of suppliers and products. Over time, we make refinements to our list of suppliers and products. In total, we have changed our database (i.e., XML file) 10 times, and thus have 10 versions of the same file.

Getting our ducks in a row

Let's navigate to the test directory in question.

$ cd $TXSCHEMA/src/test_cases/squash/testcase3
$ ls
CVS/                   company2.xml           company7.xml           company_temp_anno.xml
company.xml            company3.xml           company8.xml           config.xml
company.xsd            company4.xml           company9.xml
company0.xml           company5.xml           company_bundle.xml
company1.xml           company6.xml           company_phy_anno.xml

Note: don't worry if you don't have the CVS directory, as listed above.

As the ls shows us, a set of input files has already been created. These are the files that the user creates; they are:



We can now perform some sanity checks to make sure everything is working correctly. (Note: the following is not required for squash to run; it is simply included here for completeness.)

$ xmllint --schema ../../../../etc/TBSchema.xsd company_bundle.xml


After xmllint completes, the last line printed to standard output should read:

company_bundle.xml validates


$ xmllint --schema ../../../../etc/TXSchema.xsd company_temp_anno.xml


$ xmllint --schema ../../../../etc/PXSchema.xsd company_phy_anno.xml


$ xmllint --schema ../../../../etc/ConfigSchema.xsd config.xml



At this point, if all has gone according to plan, everything is setup correctly and we are ready to run.



Running Squash

To run squash:

$ squash config.xml


The result will be a few new files in the current directory.

Viewing output

The output TempData_1.xml is the output of squash; it is known as the Temporal Data document. This is the document that later gets passed to the TemporalValidator tool. Opening this document will reveal over 300 lines data formatted with time varying (tv) and rep (rep) tags..

You will also notice a couple of other new files with the prefix "TempData"; these are mostly debugging output and are not as important as the file mentioned above. Future versions of tXSchema may no longer output these files.

Back to the Tutorials index.

Retrieved from http://cgi.cs.arizona.edu/apps/tauXSchema/index.php?n=Main.TestCase3
Page last modified on June 23, 2008, at 08:40 PM