The Makefile in the bin directory contains the commands necessary to build the index, and can be executed easily.
To create an index for use with the Findaid Class interface, you will need to index the words in the collection, then index the XML (the structural metadata, if you will), and then finally "fabricate" structures based on a combination of elements (for example, defining what the "main title " is: the text between open <origination> tag and the closing </unittitle> tag).
What to do:
After editing the variables at the top of the Makefile (DLXSROOT, NAMEPREFIX, and FIRSTLETTERSUBDIR), the commands listed below can be given at the command line to prepare the data and make the varioius indexes needed by XPAT.
The first time you index a new collection, we reccommend that you follow the following procedure:
make validateeach validates the individual ead2002 XML files against the ead2002 DTD
make prepdocs removes the XML and DOCTYPE declarations, changes IDs to be unique across all files, and concatenates all the XML files into one, wrapping all the ead elements in a COLL element. It also contains some "Bentley Specific" processing, especially for DAO's that you may want to change.
make validate validates the new, concatenated file against the dlxsead2002 DTD
make singledd indexes the full text of the full file
make xml indexes the XML structure while at the same time validating. The use of xmlrgn by this command is slower than multirgn because of this validation.
make post builds and indexes fabricated regions based on the XPAT queries stored in the samplefa.extra.srch file.
After you have made any changes necessary to index without errors, when adding records to the index you may want to run a command that runs all the steps. That command is make all. If running make all results in errors, you should run make clean, which will remove all the index and prep files, and then run the steps one by one in order to determine the source of the errors.
make all runs all the above commands
make prepdocslist same as make prepdocs but reads the file "list_of_eads" in the data directory to get the list of eads to index in a specific order instead of just indexing all the xml files in the data directory in ascii alpha order.
make allbutprep runs all the steps except for make prepdocs. This is useful if you run make prepdocslist instead of make prepdocs
make clean removes all created temporary prep and index files so you can start over
Click here for the text of an example Makefile