Skip to main content
more options

III. A. 2. Creating a Draft Metadata XML File Using a PERL Script

 

Section A of this document contains the protocol to be followed if a new version of the PERL script is needed for the journal title in hand.

Section B of this document contains the protocol to be followed if you have been given a TeX file against which to run the PERL script.


 

Section A - Protocol to be followed if a new version of the PERL script is needed for the journal title you are working on.

If there is already a "makeXML..." file in any of the orig files for your journal, you may move it to the folder for the issue you are working on, and use it to run against the TeX for your issue. Remember to change your name and email, if someone else made the file.

1. Go to Library21/metadata/Euclid_DPUBS/makeXML-euclid1.pl. (See below.)

undefined

2. Copy and paste this file into the "orig" file of the issue whose TeX you are going to work on.

3. Right-click on this new file and re-name it to the Euclid abbreviation for the journal title.

Ex: make it "makeXML-ss.pl" for Statistical Science

4. Right-click on your renamed file and send to NotePad to edit.

5. Scroll down to


## DTD name and path
$dtd = '<!DOCTYPE euclid_issue SYSTEM "Z:\Euclid_DPUBS\dtds\euclid\euclid_issue-m_internal.dtd">';

And make sure that it contains the correct drive letter for your computer's connection to Library21.
 

6. Scroll down to

## contact info
$contact_name = 'Nancy Solla';
$contact_email = 'nv19@cornell.edu';
$contact_phone = '607-254-8094';

and put your name in place of Nancy's, if you're not Nancy. On the next line, change the email address to yours, and make sure you leave the "\" in there. XML uses"@" for something else if you don't insert a "\" before it.  Make sure the phone number is correct as well.

7. Save the document in NotePad. You are now ready to run the PERL script against this document. (See directions below.)

Note: I've inserted a "keywords" line after the abstract line. If your journal doesn't include a keywords list, you can just delete this. I've also inserted the <p></p> in the abstract line, so you won't have to do this to get your XML file to validate.

 


  

Section B - Running the PERL Script Against a TeX File

1. Go to the Start/Run and type in the word "cmd" and click "ok".

undefined

The following window will appear:

undefined

 

2. Type: (the letter your connection to Library21 is mapped to): + the "enter" key. For this example, "Z: + enter".  When you do, the computer will create a second line, in this example, "Z:\>"


Type "Z: + enter"

undefined

The result:

undefined

 

3. Type in the path to your TeX file + "enter." You need to change the directory, so you will type the characters "cd" and a space before the path. (To find the path, look in the Windows Explorer and notes the series of folders you open to get to the TeX file. Note that DOS hates spaces or hyphens in file names. If one of the folders has either of those things in its' name, right-click on it, go to "properties," and look at the DOS name. An example of a DOS form for the filename ssci 13" would be "SSCI13~1". Once you hit enter, the computer will automatically generate the last line you see there, if it can confirm or validate your path.) The example below shows the name "annm165001SAMPLE," which does not have a different DOS form because it contains no spaces or hyphens.

undefined

If the computer validates your path - that is, it doesn't give you the message that says "The system cannot find the path specified," you can proceed. (If it does give you this error message, you need to go back to Windows Explorer and confirm the filenames again.)  If you have typed in the correct path, the validation will appear as below:

undefined

 

4. Once you have a valid path, type: dir + "enter." The computer will automatically generate a listing of files in the folder. Look to the lower right of this display. Do you see the files against which you wish to run the script? If not, close the command prompt window and go back to Windows Explorer to check the filename again.

undefined

 

5. If your TeX file is in the directory, type the following:

perl makexml-euclidjournalabbreviation.pl TeXfilename.txt > whateveryouwanttonameit.xml

Ex: For this sample issue the journal "Annals of Math," the file I wish to run the script against is called "annm165001.txt," and I would like the new xml files that I am creating to be called "annm165001.xml." In this case, I would type:

perl makexml-annm.pl annm165001.txt > annm165001.xml

then press "enter."

undefined

 

6. Your newly-created XML file will be saved in the same "orig" folder in which your TeX and your PERL script are stored. (See below.)  You can close the DOS window now.

undefined


7. Open the file in XMLSpy or Oxygen. Click on the "validate" icon to see if it is a well-formed file. You are now ready to fill in the abstracts, if you have TeX for them, and proofread/edit the .xml file.