Print

Print


Laura,
A simple XSLT 2.0, using the xsl:result-document element, would fit all 
of your critera. Untested, but basically:
-------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:mods="http://www.loc.gov/mods/v3" 
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">

<xsl:output method="xml" indent="yes"/>

<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="mods:modsCollection">
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="mods:mods">
<xsl:variable name="out-path" as="xs:string">
<!-- calculate a name for your file here -->
</xsl:variable>
<xsl:result-document href="{$out-path}.mods" indent="yes" method="xml">
<xsl:copy-of select="current()"/>
</xsl:result-document>
</xsl:template>

</xsl:stylesheet>

-----------------------

-Jon

-- 
Jon Stroop
Metadata Analyst
C-17-D2 Firestone Library
Princeton University
Princeton, NJ 08544

Email: [log in to unmask]
Phone: (609)258-0059
Fax: (609)258-0441

http://diglib.princeton.edu
http://diglib.princeton.edu/ead



On 09/15/2010 11:59 AM, Akerman, Laura wrote:
>
> Under the "ask, you never know, you might receive" category:
>
> This seems really simple and basic, but what tools or approaches are 
> there out there to break a MODS collection document into separate XML 
> files for the constituent records? It would help if the tool was free, 
> didn't require extensive programming knowledge, worked on a windows 
> box with Oxygen installed…
>
> We can figure it out, just want to save time if possible
>
> Thanks,
>
> Laura
>
> Laura Akerman
>
> Technology and Metadata Librarian
>
> Robert W. Woodruff Library
>
> Emory University
>
> Atlanta, Ga. 30322
>
> (404)727-6888
>
> [log in to unmask]
>
>
> ------------------------------------------------------------------------
> This e-mail message (including any attachments) is for the sole use of
> the intended recipient(s) and may contain confidential and privileged
> information. If the reader of this message is not the intended
> recipient, you are hereby notified that any dissemination, distribution
> or copying of this message (including any attachments) is strictly
> prohibited.
>
> If you have received this message in error, please contact
> the sender by reply e-mail message and destroy all copies of the
> original message (including attachments).