Liang:
The Library of Congress offers a simple DC to MODS XSLT at
http://www.loc.gov/standards/mods/simpleDC2MODS.xslThis LC code might be all you need. That is, you might find customizing that code easier than customizing ours, because ours is so highly customized to meet our local needs. However, you are welcome to look at our version on our git repo.
We customized the LC version mentioned above so it could detect a wide variety of conditions it might encounter in the DC files as generated by our internal metadata workflow process, which has to accommodate DC files generated by a variety of collections across our campus, but even our XSLT should work fairly well on just plain DC files so long as you understand the following points...
Our transform needed to handle the OAI-DC records that CONTENTdm can generate, so our XSLT requires that the DC to be wrapped in an OAI-PMH wrapper. See the example file: oai-dc-sample.xml in our GIT repo.
There are some instructions at the beginning of our XSLT file itself that may or may not help you. They were written mostly for local purposes or were included in the original LC code, but never deleted.
The code also requires some external XML files that contain some controlled vocabularies, and you will receive parsing errors when you execute the XSLT when it looks for variables that set in those files.
Please note that some MODS elements are hardcoded into the XSLT, such as our rights statement, so you will want to change them manually for your own institution.
You will find the sample OAI_DC source file (oai-dc-sample.xml) and the actual XSLT (oai-dc2mods.xsl) in our git repo. Our controlled vocabulary files are also there.
Feel free to use, modify, or share as you see fit. There are no guarantees that it will work for you, but I'll try to answer any easy questions you may have about it.
The code can be downloaded in either of these ways:
https://github.com/petermacdonald/DC2MODS.gitgit://
github.com/petermacdonald/DC2MODS.git
Peter
Hi Peter,
We do need to transform DC 2 MODS and I wonder if you can share your working DC2MODS xslt?
Thank you,
Liang
On Saturday, May 5, 2012 11:10:23 PM UTC-4, Peter MacDonald wrote: