Here's the problem -- you are missing a switch.  In MarcEdit, the XSLT conversations run through Marc21XML.  To move from MARC21XML to MARC, MarcEdit uses a crosswalk to the mnemonic format.  When you use the GUI -- this value is set for you -- but since it is user configurable, the command-line requires you to set it.  So, for example, here's an example of how it would look running on my machine (below).


Here's a full commandline example:

c:\Program Files\MarcEdit 5.0>cmarcedit -s c:\users\reeset\desktop\2011.xml -d c:\users\reeset\desktop\2011b.mrc -xmlmarc -mxslt c:\program files\MarcEdit 5.0\xslt\MARC21slim2Mnemonic.xsl 

Beginning Process...
2 records have been processed in 2.686151 seconds.

-----Original Message-----
From: Code for Libraries [mailto:[log in to unmask]] On Behalf Of Crowe, Sean (crowesn)
Sent: Thursday, September 01, 2011 1:38 PM
To: [log in to unmask]
Subject: [CODE4LIB] MarcEdit command line tool

I'm scripting some batch editing routines and I'd like to use the MarcEdit command line tool to convert Marc21XML to MARC. I can successfully convert using the 5.2 gui but no dice using the command line tool. To this point I've only every used the command line tool to break and make marc files.

Here is my syntax:
C:\Program Files\MarcEdit 5.0>cmarcedit.exe -s xmltest.xml -d xmltest.mrc -xmlmarc Beginning Process...
-1 records have been processed in 0.000000 seconds.

Header and namespace info from xml doc:
<?xml version='1.0' encoding='UTF-8' ?>
<collection xsi:schemaLocation='' xmlns='' xmlns:xsi=''>

Should I be referencing an xslt file?

Thanks in advance,

Sean Crowe
Electronic Resources Librarian

Electronic Resources Dept.
University of Cincinnati Libraries
PO Box 210033
Cincinnati OH 45221-0033
Tel: (513) 556-1899
Fax: (513) 556-4393
Email: [log in to unmask]
gchat: crowesn