Files required to execute java program for TEI shell creation are maintained on this page except for project specific TEI-output stylesheets, which are maintained on the respective project wiki pages. When linking to supporting files to execute the java program, reference the files mainatined on this page. Thank you!
Files Needed to Execute TEI Shell Creation
- OCR2TEI.jar: Java program; execute on most DLP servers or local machine with java support
- In most cases, java program will be executed on: //bleu.dlib.indiana.edu/digitize_data/[projectdir]/
- You must have JRE (Java) 1.5 or later in order to run this program
For MARC-Based TEI Header
- dataprocessing.xsl: Style sheet imported by generateTEIheaderFullTEI-ia.xsl; no need to update (publication date normalization)
- MARC21slimUtils.xsl: Style sheet imported by generateTEIheaderFullTEI-ia.xsl; no need to update (definition of MARC tags, subtags and indicators)
- generateTEIheaderFullTEI.xsl: Style sheet that generates the TEI shell with MARC metadata in the Header; expects idno parameter (e.g., VA#)
- idno.properties: Properties file identifies that paramters needed by TEI Shell style sheet (attached is a sample file to be modified accordingly with corresponding VA#)
For Custom TEI Header
Documentation in progress for Custom Header output; see MARC to Header output documentation below.
This java program replaces our original Perl concatenation workflow.
- template.xml (need to be created and tested)
- not sure of the rest, need to test
- If populating from file (xml file, header derived manually), use the default.xml template that you can tailor (in the header) for specific project needs
- Place the following files in the desired project directory on DLP server; must be level with VAA/VAB sub-directories:
- generateTEIheaderFullTEI.xsl (if MARC-based Header) OR template.xml (if custom header)
How the OCR to TEI Shell Program Works
- The concatenation files need to be in the root directory that contains all the VA sub-directories for the project.
- It assumes there is a "OCR" (case insensitive) directory inside the VA# directory.
Executing TEI Shell for MARC-Based TEI Header
Note: This program needs to be run for each book (each VA#). This will require updating the idno.properties file every time before running the program.
- Make sure all the necessary files are placed in the proper directory as explained under "Setup"
- Determine the first book that requires a TEI Shell; note the VA#
- Open the idno.properties file and update the idno value so it matches the VAA# of the book for which you are about to generate a TEI Shell XML file
- Open file and edit using emacs, vi, pico or any allowable unix editor or you can open the file in notepad, update and transfer file back to directory (SFTP)
- Open an SSH terminal
- Run the java command
- Be sure to state the proper VA#.
- Be sure you note the title control number for the book
- The URL for the MARC metadata should ALWAYS be in double quotes, and is of one of two forms: Please see this page for details: URL for MARC metadata
- Be sure you updated the idno.properties file as specified in step 3.
- All other arguments (-jar, -s, -p, -v) are the same for every book
- Sample usage:
An example of using an XSLT stylesheet to transform the template during concatenation.(Please see URL for MARC metadata for an example URL)
Another example, where only the template is used, and no XSLT.
- If you get a Premature end of file error, test the MARC URL with the proper title control number inserted. We have encountered problems retrieving the MARC data via SRU.
Testing the Output of TEI Shell for MARC-Based TEI Header
You should find the TEI/XML shell file level with the VAA directories.
- After running the program once, verify that an XML file was created.
- Check to make sure the VAfilename.xml assigned corresponds to the intended book's VAA#.
- Open the XML file in Oxygen
- Make sure the file is valid
- If file is valid, this is a good first step!
- Spot check the bibliogaphic metadata
- If metadata doesn't match, the title control number for the "metadata URL" is either incorrect or causing problems due to the title control number construction. Contact Jenn Riley if this is the case.
- If file is not valid, check to make sure the proper version (P4) of the TEI was declared when running the Java program.
Testing the Output of TEI Shell for Custom TEI Header
- To be documented