Creating a sample file

A sample file is an XML file that Metadata Hopper uses to test if the fields you are mapping are correct. It must contain all the elements that you want to map along with values for those elements. Sample files are temporary files that are discarded upon completing your import mapping rules, so they may contain nonsense values.

For example, if you wish to create rules that have mappings for only title and identifier elements and your metadata contains elements called “title”, “id”, “subject” and “coverage,” you would need to make sure that your title and identifier elements exist in your sample file and have some sort of content for these elements.

Consider then a potential sample file for this set of rules with the following structure:

<metadata>
	<title>Title</title>
	<id/>
	<subject>Subject</subject>
	<coverage>Coverage</coverage>
</metadata>

This would not be a successful sample file as it does not have any value for the identifier element, ID. Therefore a test to check that the identifier element path is correct would fail. Try instead a sample file with the following structure:

<metadata>
	<title>Title</title>
	<id>1993.6</id>
	<subject>Subject</subject>
	<coverage>Coverage</coverage>
</metadata>

Now there is a value for the identifier element and the title element. Therefore all tests would pass successfully.