Crosswalking MODS to DC

317 views
Skip to first unread message

Peter MacDonald

unread,
May 5, 2012, 8:41:38 AM5/5/12
to isla...@googlegroups.com
Each of our Fedora records were ingested by a python script and have a MODS datastream, but on ingest the MODS field values did not get copied over into the DC datastream. The DC just has dc:title and dc:identifier.

Is there a way (command-line perhaps) to force populating the DC from the MODS datastream after the records have already been ingested?

Peter
Hamilton College Library

Don

unread,
May 5, 2012, 7:08:35 PM5/5/12
to isla...@googlegroups.com
Peter do you have a MODS to DC xslt that works for you? Something you've tested in Oxygen or something else?

Sounds like you might be missing a xsl processor on your box? Or there might be something misconfigured?

You could curl that MODS records out of your the objects in your Fedora and do something like this to convert them to DC using your transform ... then you could curl them back in. To use the script below you would need to have xalan or some other xslt processor installed on your machine.

### script to get transform MODS to DC
###  Transforming TEI to Plaintext  ###############
#
# pids.txt is a list of your PIDS less the namespace
#
for PID in `cat pids.txt`
#
do
###  tranform MODS to DC ###############
      echo $PID
      java org
.apache.xalan.xslt.Process -IN $PID.xml -XSL mods2dc.xsl -OUT $PID-dc.xml

done

Give that a try. 
Don

Don

unread,
May 5, 2012, 7:14:23 PM5/5/12
to isla...@googlegroups.com
Just reviewing my response ... boy ... a bit of a mess. This part "You could curl that MODS records out of your the objects in your Fedora" should read
"You could curl the MODS datastreams out of the objects in your Fedora Repository" ...
Don

Peter MacDonald

unread,
May 5, 2012, 11:01:25 PM5/5/12
to isla...@googlegroups.com
Thanks, Don.

I will try to figure out how to do all that. It sounds like a useful thing to know how to do.

Peter

Peter MacDonald

unread,
May 5, 2012, 11:10:23 PM5/5/12
to isla...@googlegroups.com
Don:

I only have a working DC 2 MODS xslt that I wrote that works for us, I do NOT have one that goes from MODS to DC. If you know where I can get one, I'll be happy to get it and to customize it to meet our local needs. Then I'll try the curl thing.

Peter

--
You received this message because you are subscribed to the Google Groups "islandora" group.
To view this discussion on the web visit https://groups.google.com/d/msg/islandora/-/GN_5cMBN7iQJ.
To post to this group, send email to isla...@googlegroups.com.
To unsubscribe from this group, send email to islandora+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/islandora?hl=en.

Richard Wincewicz

unread,
May 6, 2012, 7:32:40 AM5/6/12
to isla...@googlegroups.com
Hi Peter

There's a MODS to DC XSLT that comes with the islandora module and can be found in the xsl directory. That should be a good start for what you need.

Richard

Peter MacDonald

unread,
May 6, 2012, 11:36:01 AM5/6/12
to isla...@googlegroups.com
Thanks, Richard. I'll start with the transform supplied with Islandora.

Peter

Kirsta Stapelfeldt

unread,
Sep 11, 2012, 1:17:01 PM9/11/12
to isla...@googlegroups.com
We have a repository too at https://github.com/Islandora/islandora_ingest_forms - would be great to start getting community contributions!

On Tue, Sep 11, 2012 at 12:38 AM, Liang <lz....@gmail.com> wrote:
Hi Peter,

We do need to transform DC 2 MODS and I wonder if you can share your working DC2MODS xslt?

Thank you,

Liang

--
 
 



--
================================
Kirsta Stapelfeldt, MA, MLIS
Islandora Project/Repository Manager
Robertson Library
University of Prince Edward Island

Subject Matter Expert
Discovery Garden Inc.

kstape...@upei.ca
Skype Name: Kirsta.Stapelfeldt
902.620.5096

Peter MacDonald

unread,
Sep 11, 2012, 1:42:13 PM9/11/12
to isla...@googlegroups.com
Liang:

The Library of Congress offers a simple DC to MODS XSLT at
http://www.loc.gov/standards/mods/simpleDC2MODS.xsl
This 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.git
git://github.com/petermacdonald/DC2MODS.git

Peter

On Mon, Sep 10, 2012 at 11:38 PM, Liang <lz....@gmail.com> wrote:
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:

--
 
 

Reply all
Reply to author
Forward
0 new messages