I really like Ben's idea of programmatically reading the XML schema and
generating the XML structure based on that rather than hard-coding each
metadata schema. I've hit a snag. I'm using the MODS 3.5 schema as a
starting point.
http://www.loc.gov/standards/mods/v3/mods-3-5.xsd
By convention, it seems that a properly formed MODS file starts with a
<modsCollection> element that wraps the whole file and then an individual
<mods> element for each record. However, when you look at the schema file,
there doesn't seem to be anything that specifies that structure. Every
element, including the individual metadata fields and subfields, are
globally defined top-level elements. As a result, I have no idea how I
could tell my program which element to use as my document root without
hard-coding that information for each schema. I couldn't even do something
as simple as saying that the first defined element should be the document
root because, in the case of MODS, the <mods> tag is defined before
<modsCollection>, whereas <modsCollection> is actually the root element.
Any suggestions?
Josh Welker
-----Original Message-----
From: Code for Libraries [mailto:[log in to unmask]] On Behalf Of Ben
Companjen
Sent: Monday, December 09, 2013 10:52 AM
To: [log in to unmask]
Subject: Re: [CODE4LIB] Lorem Ipsum metadata? Is there such a thing?
Cool!
My first thought on this topic was: give the program an XML schema, and
generate possible documents with the correct datatypes etc. (Something like
that must exist somewhere, right?) Does it happen to work anything like
that, or is it hardcoded to generate these specific elements?
Ben
On 09-12-13 17:27, "Joshua Welker" <[log in to unmask]> wrote:
>Challenge accepted.
>
>http://library.ucmo.edu/dev/metadata-generator.php
>
>Obviously in the prototype phase, but it works. Only MODS is available
>for now, and you can only select top-level elements (all child elements
>of the top-level selections will be auto-generated). I will try to
>expand it to more than just MODS. Admittedly, I know very little about
>METS, so I will need some assistance if I am going to make one of those.
>
>I'll eventually host this somewhere else once it's done, so don't
>bookmark it.
>
>Josh Welker
>Information Technology Librarian
>James C. Kirkpatrick Library
>University of Central Missouri
>Warrensburg, MO 64093
>JCKL 2260
>660.543.8022
>
>-----Original Message-----
>From: Code for Libraries [mailto:[log in to unmask]] On Behalf Of
>Kevin S. Clarke
>Sent: Sunday, December 08, 2013 12:26 PM
>To: [log in to unmask]
>Subject: Re: [CODE4LIB] Lorem Ipsum metadata? Is there such a thing?
>
>When I first read this, I was imagining not having to give it your
>metadata but native support for most of our commonly used metadata
>records... so the interface is: "Give me 100 MODS records" and it spits
>that out... You could get fancy and say, "Give me X number of METS
>records that wrap TIFFs and JPGs and that uses MODS, etc." That's not
>as trivial as hooking into an lorem ipsum machine, but it'd be pretty
>cool, imho.
>
>Kevin
>
>
>On Sat, Dec 7, 2013 at 11:51 PM, Pottinger, Hardy J. <
>[log in to unmask]> wrote:
>
>> Hi, I asked this on Google Plus earlier today, but I figured I'd
>> better take this question here: my brain is trying to tell me that
>> there's a service or app that makes "fake" metadata, kind of like
>> "Lorem Ipsum" but you feed it your fields and it gives you nonsense
>> metadata back. But, it looks right enough for testing. Yesterday, I
>> had to make up about 50 rows of fake metadata to test some code that
>> handles paging in a UI, and I had to make it all up by hand. This
>> hurts my soul. Someone please tell me such a service exists, and link
>> me to it, so I never have to do this again. Or else, I may just make
>> such a service, to save us all. But I don't want to go coding some
>> new service if it already exists, because that sort of thing is for
>> chumps.
>>
>>
>> --
>> HARDY POTTINGER <[log in to unmask]> University of Missouri
>> Library Systems http://lso.umsystem.edu/~pottingerhj/
>> https://MOspace.umsystem.edu/
>> "Making things that are beautiful is real fun." --Lou Reed
>>
|